Share via


RmOpenResource (Compact 7)

3/12/2014

This function opens a resource of the type specified by pResId. After it is opened, Connection Manager will receive resource-wide asynchronous notifications on the state of the resource.

Syntax

RM_RESULT RmOpenResource(
    __in HANDLE hId,
    __in const RM_RESOURCE_ID* pResId
);

Parameters

  • [in] pResId
    [in] An RM_RESOURCE_ID identifying the type of resource to open.

Return Value

The function returns the following values:

Value Description

RMRE_SUCCESS

The call succeeded.

RMRE_INVALID_PARAMETER

One of the input parameters is invalid.

RMRE_NOT_INITIALIZED

The hId parameter cannot be matched to an initialized resource.

RMRE_UNEXPECTED

An unexpected failure occurred.

Remarks

Resource-wide notifications include availability, network type, roaming status, and bandwidth.

Requirements

Header

rmnet.h

Library

rmnet.lib

See Also

Reference

Resource Manager Functions
RM_RESOURCE_HANDLE
RM_RESOURCE_ID
RmInitialize
Resource Manager Service Provider Reference