MrmDumpPriDataInMemory 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.]

Dumps PRI info (as a blob in memory, created by a previous call to MrmCreateResourceFileInMemory) to its XML equivalent (as in-memory data), in order to make it more easily readable. The function allocates memory and returns a pointer to that memory in outputXmlData. 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 MrmDumpPriDataInMemory(
  _In_     BYTE        *inputPriData,
  _In_     ULONG       inputPriSize,
  _In_opt_ BYTE        *schemaPriData,
  _In_     ULONG       schemaPriSize,
  _In_     MrmDumpType dumpType,
  _Out_    BYTE        **outputXmlData,
  _Out_    ULONG       *outputXmlSize
);

Parameters

inputPriData [in]

Type: BYTE*

A pointer to PRI data created by a previous call to MrmCreateResourceFileInMemory.

inputPriSize [in]

Type: ULONG

The size of the data pointed to by inputPriData.

schemaPriData [in, optional]

Type: BYTE*

An optional pointer to PRI info (as a blob in memory) representing schema data created by a previous call to MrmCreateResourceFileInMemory. Don't free schemaPriData until after you've finished using the resource indexer. Also see Remarks.

schemaPriSize [in]

Type: ULONG

The size of the data pointed to by schemaPriData.

dumpType [in]

Type: MrmDumpType

Specifies how detailed the XML dump should be, or whether a schema should be dumped.

outputXmlData [out]

Type: BYTE**

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

outputXmlSize [out]

Type: ULONG*

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

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

A schema-free resource pack is one that was created with the MrmPackagingOptionsOmitSchemaFromResourcePacks argument passed to MrmCreateResourceFile or MrmCreateResourceFileInMemory (or with the omitSchemaFromResourcePacks switch in the PRI config file). To dump a schema-free resource pack, pass the path to your main package PRI data as the argument for the schemaPriData parameter.

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