Creates a new IStream with the content of a PE resource
Syntax
HRESULT WINAPI SHCreateStreamOnModuleResourceW (
HMODULE hModule,
LPCWSTR pwszName,
LPCWSTR pwszType,
IStream** ppStream
)
Parameters
- hModule
- The module containing the resource. This can be any hModule accepted by FindResource
- pwszName
- The name of the resource. Can be an ordinal passed via MAKINTRESOURCE
- pwszType
- The resource type. Can be one of the standard RT_ identifiers or a custom type
- ppStream
- A pointer to a pointer that receives the new IStream
Return Value
S_OK on success, E_OUTOFMEMORY otherwise
Remarks
The resource bytes are copied into the IStream, so after the function returns hModule can be unloaded without affecting the contents of *ppStream.
If you have the filename and don't otherwise need the hModule parameter, consider using SHCreateStreamOnDllResourceW instead
This function is also known as _SHCreateStreamOnModuleResourceW@16.