|
IMarshal::GetMarshalSizeMax
Returns an upper bound on the amount of data that would be written to the
marshaling stream in a call to IMarshal::MarshalInterface.
HRESULT IMarshal::GetMarshalSizeMax(
REFIID riid,
| //Identifies interface to be marshaled
| void *pv,
| //Points to interface pointer to be marshaled
| DWORD dwDestContext,
| //Identifies destination process
| void * pvDestContext,
| //Reserved for future use
| DWORD mshlflags,
| //Specifies reason for marshaling
| ULONG * pSize
| //Receives upper bound
| );
|
|
Parameters
riid
[in]Specifies the IID of the interface pointer to be marshaled.
pv
[in]Points to the interface pointer to be marshaled; can be NULL.
dwDestContext
[in] Specifies the destination context, that is, the process in which the
unmarshaling will be done. Different marshaling can be done depending on whether
the unmarshaling will happen on the local workstation or on a workstation on the
network; it's possible for an object to do custom marshaling in one case but
not another. The legal values for dwDestContext are taken from the enumeration MSHCTX. For information on the MSHCTX enumeration, see the "Data Structures" section.
pvDestContext
[in] Reserved for use with future MSHCTX values.
mshlflags
[in] Specifies why marshaling is taking place. The legal values for mshlflags are taken from the enumeration MSHLFLAGS. For information on the MSHLFLAGS enumeration, see the "Data Structures" section.
pSize
[out]Receives the upper bound on the amount of data that would be written to
the marshaling stream.
Return Values
S_OK
Maximum size was returned successfully.
E_FAIL
Indicates that the implementation failed.
E_NOINTERFACE
The specified interface was not supported.
Comments
This method is called from the originating side (that is, the side doing the
marshaling). This method is used to preallocate the stream buffer that will be
passed to IMarshal::MarshalInterface.
Notes to Implementors
The value your implementation returns must be an upper bound; a subsequent
call to your implementation of IMarshal::MarshalInterface must use no more than the number of bytes returned by this method. The upper
bound you return can be used by the caller to preallocate a stream buffer for
using during marshaling.
See Also
IMarshal::MarshalInterface
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|