RspAcquire (Compact 7)
3/12/2014
This function is called by the Resource Manager to lock an instance of a resource specified by pResId.
Syntax
RM_RESULT RspAcquire(
__in const RM_RESOURCE_ID* pResId,
__deref_out RM_RESOURCE_HANDLE* phResource);
Parameters
- [in] pResId
[in] Pointer to an RM_RESOURCE_ID identifying the resource to acquire.
[in,out] phResource
[in] Pointer to a storage area to place the output.[out] Pointer to an RM_RESOURCE_HANDLE for the acquired resource. This is used in calls to RspRelease, and in notification from the Resource Service Provider.
Return Value
The function returns the following values:
Value | Description |
---|---|
RMRE_SUCCESS |
The call succeeded. |
RMRE_CONFLICT |
The resource is in use by a higher priority application. |
RMRE_EXTERNAL_CONFLICT |
A resource is not available due to an external condition. For example, a data call was requested and no data network is available. |
RMRE_INVALID_PARAMETER |
One of the input parameters is invalid. |
RMRE_UNEXPECTED |
An unexpected failure occurred. |
Remarks
The Resource Service Provider checks for available resources that are not blocked by the state of the device. For example, an active voice call that would block establishing a cellular data connection.
Requirements
Header |
rmnet.h, |
Library |
RspCellular.lib |
See Also
Reference
Resource Manager Service Provider Functions
RM_RESOURCE_HANDLE
RM_RESOURCE_ID
RspInitialize
RspRelease
Resource Manager Service Provider Reference