Index   Commented   Search   About

GetHGlobalFromStream

Returns the global memory handle to a stream that was created using the CreateStreamOnHGlobal function.

HRESULT GetHGlobalFromStream(

IStream * pstm,
//Points to the stream object
HGLOBAL * phglobal
//Points to the current memory handle for the specified stream
);

Parameters

pstm

Points to the stream object previously created by a call to the CreateStreamOnHGlobal function.

phglobal

Points to the current memory handle used by the specified stream object.

Return Values

S_OK

Indicates the handle was successfully returned.

E_INVALIDARG

Indicates invalid value specified for the pstm parameter. It can also indicate that the stream object passed in is not one created by a call to the CreateStreamOnHGlobal function.

Comments

The handle this function returns may be different from the original handle due to intervening GlobalRealloc calls.

This function only works within the same process from which the byte array was created.

See Also

CreateStreamOnHGlobal

GlobalRealloc
in Win32

Related Links

Software 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

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun