Game Development Reference
In-Depth Information
[ComImport(), InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
GuidAttribute(“000214e4-0000-0000-c000-000000000046”)]
public interface IContextMenu
{
[PreserveSig()]
int QueryContextMenu(uint menu,
uint menuId,
int firstCommand,
int lastCommand,
uint flags);
[PreserveSig()]
void InvokeCommand(IntPtr pointer);
[PreserveSig()]
void GetCommandString(int command,
uint flags,
int reserved,
StringBuilder commandString,
int max);
}
The IDataObject interface provides a mechanism through which data can be trans-
ferred; it is also used to handle notifications related to the data, such as changes.
The data transfer mechanism specifies the format of the data, along with the medium
through which the data is transferred.
Note
The term data objectrefers to any object that implements the IDataObject interface.
The IShellExtInit.Initialize() method is given a pointer to an IDataObject that
contains our file objects; we must define the IDataObject interface so that we can
cast the pointer to a data object. The only method we need in this interface is
GetData() , which is supplied with the data format, along with a storage medium
container, and we are given the data itself.
[ComImport(), InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
GuidAttribute(“0000010e-0000-0000-C000-000000000046”)]
public interface IDataObject
{
[PreserveSig()]
int GetData(ref ClipFormat a, ref StorageMedium b);
 
Search Nedrilad ::




Custom Search