Game Development Reference
In-Depth Information
void GetDataHere(int a, ref StorageMedium b);
int QueryGetData(int a);
int GetCanonicalFormatEtc(int a, ref int b);
int SetData(int a, int b, int c);
int EnumFormatEtc(uint a, ref Object b);
int DAdvise(int a, uint b, Object c, ref uint d);
int DUnadvise(uint a);
int EnumDAdvise(ref Object a);
There are a number of unmanaged Win32 types that must also be defined so that
the unmanaged methods can use them. There are also several unmanaged types
within the structures that will be covered later. It is also important to note the use
of the [StructLayout] attribute. By default, the CLR automatically chooses a layout
for structure members when compiled. This can lead to format problems when
interacting with COM callers. By specifying LayoutKind.Sequential , the structure
layout is defined in the order in which members appear.
The InvokeCommandInfo structure defined below is known as CMINVOKECOMMANDINFO in the
unmanaged world. It contains information needed by IContextMenu.InvokeCommand()
to execute a context menu command.
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct InvokeCommandInfo
public uint Size;
public uint Mask;
public uint Window;
Search Nedrilad ::

Custom Search