|
|
|
IMarshal Interface |
|
IID_IMarshal |
{00000003-0000-0000-C000-000000000046} |
|
The IMarshal interface enables a COM object to define and manage the marshaling of its interface pointers. The alternative is to use the COM default implementation, the preferred choice in all but a few special cases.
Marshaling is the process of packaging data into packets for transmission to a different process or machine. Unmarshaling is the process of recovering that data at the receiving end. In any given call, method arguments are marshaled and unmarshaled in one direction, while return values are marshaled and unmarshaled in the other.
COM calls this interface as part of system-provided marshaling support. The COM calls are wrapped in calls to CoMarshalInterface and CoUnmarshalInterface. Your code typically will not need to call this interface.
|
|
Methods in VTable order |
|
|
IUnknown Methods |
Description |
|
QueryInterface |
Returns pointers to supported interfaces. |
|
AddRef |
Increments reference count. |
|
Release |
Decrements reference count. |
|
IMarshal Methods |
Description |
|
GetUnmarshalClass |
Returns CLSID of unmarshaling code. |
|
GetMarshalSizeMax |
Returns size of buffer needed during marshaling. |
|
MarshalInterface |
Marshals an interface pointer. |
|
UnmarshalInterface |
Unmarshals an interface pointer. |
|
ReleaseMarshalData |
Destroys a marshaled data packet. |
|
DisconnectObject |
Releases all connections. |
|
GetUnmarshalClass |
|
FUNCTION IMarshal_GetUnmarshalClass ( _ BYVAL pthis AS DWORD PTR _ , BYREF riid AS GUID _ , BYVAL pv AS DWORD _ , BYVAL dwDestContext AS DWORD _ , BYVAL pvDestContext AS DWORD _ , BYVAL mshlflags AS DWORD _ , BYREF pCid AS GUID _
)
AS LONG
|
|
FUNCTION IMarshal_GetUnmarshalClass ( _ BYVAL pthis AS DWORD PTR _ , BYREF riid AS GUID _ , BYVAL pv AS DWORD _ , BYVAL dwDestContext AS DWORD _ , BYVAL pvDestContext AS DWORD _ , BYVAL mshlflags AS DWORD _ , BYREF pCid AS GUID _
)
AS LONG ! mov eax, pCid ! push eax
! push mshlflags
! push dwDestContext ! push eax ! mov eax, pthis
|
|
GetMarshalSizeMax |
|
FUNCTION IMarshal_GetMarshalSizeMax ( _ BYVAL pthis AS DWORD PTR _ , BYREF riid AS GUID _ , BYVAL pv AS DWORD _ , BYVAL dwDestContext AS DWORD _ , BYVAL pvDestContext AS DWORD - , BYVAL mshlflags AS DWORD _ , BYREF pSize AS DWORD _
)
AS LONG
|
|
FUNCTION IMarshal_GetMarshalSizeMax ( _ BYVAL pthis AS DWORD PTR _ , BYREF riid AS GUID _ , BYVAL pv AS DWORD _ , BYVAL dwDestContext AS DWORD _ , BYVAL pvDestContext AS DWORD - , BYVAL mshlflags AS DWORD _ , BYREF pSize AS DWORD _
)
AS LONG ! push pSize
! push mshlflags
! push dwDestContext ! push eax ! mov eax, pthis
|
|
MarshalInterface |
|
FUNCTION IMarshal_MarshalInterface ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pStm AS DWORD _ , BYREF riid AS GUID _ , BYVAL pv AS DWORD _ , BYVAL dwDestContext AS DWORD _ , BYVAL pvDestContext AS DWORD _ , BYVAL mshlflags AS DWORD _
)
AS LONG
|
|
FUNCTION IMarshal_MarshalInterface ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pStm AS DWORD _ , BYREF riid AS GUID _ , BYVAL pv AS DWORD _ , BYVAL dwDestContext AS DWORD _ , BYVAL pvDestContext AS DWORD _ , BYVAL mshlflags AS DWORD _
)
AS LONG
! push mshlflags
! push dwDestContext ! push eax ! push pStm ! mov eax, pthis
|
|
UnmarshalInterface |
|
FUNCTION IMarshal_UnmarshalInterface ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pStm AS DWORD _ , BYREF riid AS GUID _ , BYREF ppv AS DWORD _
) AS LONG
|
|
FUNCTION IMarshal_UnmarshalInterface ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pStm AS DWORD _ , BYREF riid AS GUID _ , BYREF ppv AS DWORD _
) AS LONG ! push eax ! push pStm ! mov eax, pthis
|
|
ReleaseMarshalData |
|
FUNCTION IMarshal_ReleaseMarshalData ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pStm AS DWORD _
) AS LONG
|
|
FUNCTION IMarshal_ReleaseMarshalData ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pStm AS DWORD _
) AS LONG ! push pStm ! mov eax, pthis
|
|
DisconnectObject |
|
FUNCTION IMarshal_DisconnectObject ( _ BYVAL pthis AS DWORD PTR _ , BYVAL dwReserved AS DWORD _
) AS LONG
|
|
FUNCTION IMarshal_DisconnectObject ( _ BYVAL pthis AS DWORD PTR _ , BYVAL dwReserved AS DWORD _
) AS LONG ! mov eax, pthis
|
Page last updated on Friday, 17 March 2006 08:25:16 +0100