# Function Reference

# _WinAPI_GetHGlobalFromStream

Retrieves the global memory handle to a stream

#include <WinAPICom.au3>
_WinAPI_GetHGlobalFromStream ( $pStream )

## Parameters

$pStream | Pointer to the stream object previously created by a call to the _WinAPI_CreateStreamOnHGlobal() function.

## Return Value

Success: | Pointer to the current memory handle used by the specified stream object.
Failure: | 0 and sets the@error flag to non-zero, @extended flag may contain the HRESULT error code.

## Remarks

This function can be called only from within the same process from which the byte array was created.

## Related

_WinAPI_CreateStreamOnHGlobal

## See Also

Search GetHGlobalFromStream in MSDN Library.