MrmCreateResourceFileInMemory function

[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]

Creates PRI info as a blob in memory, not as a file on disk. The function allocates memory and returns a pointer to that memory in outputPriData. Call MrmFreeMemory with the same pointer to free that memory. For more info, and scenario-based walkthroughs of how to use these APIs, see Package resource indexing (PRI) APIs and custom build systems.

Syntax

HRESULT HRESULT MrmCreateResourceFileInMemory(
  _In_  MrmResourceIndexerHandle indexer,
  _In_  MrmPackagingMode         packagingMode,
  _In_  MrmPackagingOptions      packagingOptions,
  _Out_ BYTE                     **outputPriData,
  _Out_ ULONG                    *outputPriSize
);

Parameters

indexer [in]

Type: MrmResourceIndexerHandle

A handle identifying the resource indexer from which to create the PRI info.

packagingMode [in]

Type: MrmPackagingMode

Specifies whether the PRI info should be standalone, or be a resource pack. MrmPackagingModeAutoSplit is not supported.

packagingOptions [in]

Type: MrmPackagingOptions

Specifies additional options about the PRI info.

outputPriData [out]

Type: BYTE**

The address of a pointer to BYTE. The function allocates memory and returns a pointer to that memory in outputPriData. Call MrmFreeMemory with your pointer to BYTE to free that memory.

outputPriSize [out]

Type: ULONG*

The address of a ULONG. In outputPriSize, the function returns the size of the allocated memory pointed to by outputPriData.

Return value

Type: HRESULT

S_OK if the function succeeded, otherwise some other value. Use the SUCCEEDED() or FAILED() macros (defined in winerror.h) to determine success or failure.

Remarks

If you pass outputPriData to MrmCreateResourceIndexerFromPreviousPriData, then don't free the memory until after you've finished using the resource indexer.

Requirements

Requirement Value
Minimum supported client
Windows 10, version 1803 [desktop apps only]
Minimum supported server
Windows Server [desktop apps only]
Header
MrmResourceIndexer.h
Library
Mrmsupport.lib
DLL
Mrmsupport.dll

See also

Package resource indexing (PRI) APIs and custom build systems