MrmCreateResourceIndexerFromPreviousSchemaData function

Creates a resource indexer that can create PRI files that are compatible with existing PRI files. This function is only needed in fairly limited scenarios; see the Remarks section of MrmCreateResourceIndexerFromPreviousSchemaFile for more info.

COM must be initialized (e.g. by calling CoInitializeEx) before using this function.

Syntax

HRESULT HRESULT MrmCreateResourceIndexerFromPreviousSchemaData(
  _In_     PCWSTR                   projectRoot,
  _In_     MrmPlatformVersion       platformVersion,
  _In_opt_ PCWSTR                   defaultQualifiers,
  _In_     BYTE                     *schemaXmlData,
  _In_     ULONG                    schemaXmlSize,
  _Inout_  MrmResourceIndexerHandle *indexer
);

Parameters

projectRoot [in]

Type: PCWSTR

The root directory from which some file paths will be computed. Typically this will be the root directory of your source project, but may differ. See File resources in MRM for more information.

platformVersion [in]

Type: MrmPlatformVersion

The platform version (targetOsVersion) to use for the generated configuration file. Most callers should just use MrmPlatformVersion_Windows10_0_0_5

defaultQualifiers [in, optional]

Type: PCWSTR

A list of default resource qualifiers. For example, "language-en-US_scale-100". For more information about qualifiers, see Qualifiers in MRM.

schemaXmlData [in]

Type: BYTE*

A pointer to an in-memory PRI file or in-memory Schema XML dump. You can obtain an in-memory PRI file either by manually loading an existing PRI file from disk, or by creating it in-memory with MrmCreateResourceFileInMemory. You can obtain an in-memory Schema XML dump either by manually loading an existing file from disk, or by using one of the MrmDump... functions.

schemaXmlSize [in]

Type: ULONG

The size of the data pointed to by schemaXmlData.

indexer [in, out]

Type: MrmResourceIndexerHandle*

A pointer to a resource indexer handle. On successful return, this will contain a handle to a resource indexer. You must free the indexer via MrmDestroyIndexerAndMessages after using it.

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

See the Remarks section of MrmCreateResourceIndexerFromPreviousSchemaFile for more info, as this function is essentially the same (except it uses in-memory reference PRI rather than an on-disk file).

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

MrmCreateResourceIndexer

MrmCreateResourceIndexerFromPreviousPriData

MrmCreateResourceIndexerFromPreviousPriFile

MrmCreateResourceIndexerFromPreviousSchemaFile

Package resource indexing (PRI) APIs and custom build systems