|
GetHGlobalFromILockBytes
Returns a global memory handle to a byte array object created using the CreateILockBytesOnHGlobal function.
HRESULT GetHGlobalFromILockBytes(
ILockBytes * pLkbyt,
| //Points to the byte array object
| HGLOBAL * phglobal
| //Points to the current memory handle for the specified byte array
| );
|
|
Parameters
pLkbyt
Points to the byte array object previously created by a call to the CreateILockBytesOnHGlobal function.
phglobal
Points to the current memory handle used by the specified byte array object.
Return Values
S_OK
Indicates the handle was returned successfully.
E_INVALIDARG
Indicates invalid value specified for the pLkbyt parameter. It can also indicate that the byte array object passed in is not
one created by the CreateILockBytesOnHGlobal function.
Comments
The handle this function returns might be different from the original handle
due to intervening calls to the GlobalRealloc function.
The contents of the returned memory handle can be written to a clean disk
file, and then opened as a storage object using the StgOpenStorage function.
This function only works within the same process from which the byte array was
created.
See Also
StgOpenStorage
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
TMS Scripter Studio Pro components for Delphi/C++Builder
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
|