Share via


RmInitialize (Compact 7)

3/12/2014

This function initializes a Resource Manager instance and must be called before calling any other Resource Manager function.

Syntax

RM_RESULT RmInitialize(
    __in_bcount(cbClientInfo) const RM_CLIENT_INFO* pClientInfo,
    __in const DWORD cbClientInfo,
    __out HANDLE* phId
);

Parameters

  • [in] cbClientInfo
    [in] Number of bytes in the pClientInfo structure.
  • [in,out] phId
    [in] Pointer to a storage area to place the output.

    [out] Pointer to a RM_RESOURCE_HANDLE structure.

Return Value

The function returns the following values:

Value Description

RMRE_SUCCESS

The call succeeded.

RMRE_INVALID_VERSION

The version of the pClientInfo parameter is invalid.

RMRE_INVALID_PARAMETER

One of the input parameters is invalid.

RMRE_UNEXPECTED

An unexpected failure occurred.

Remarks

This function searches for and initializes the appropriate Resource Service Provider.

RMRE_INVALID_PARAMETER is returned if the pClientInfo, pfnNotification parameter is invalid.

RMRE_INVALID_PARAMETER is returned if the cbClientInfo parameter indicates the size of the pClientInfo parameter is too small to hold a RM_CLIENT_INFO structure.

If the call fails, the phId parameter is unchanged.

Requirements

Header

rmnet.h

Library

rmnet.lib

See Also

Reference

Resource Manager Functions
RM_CLIENT_INFO
RM_CALLBACK
RM_RESOURCE_HANDLE
Resource Manager Service Provider Reference