Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize

DRMGetUsers function

[The AD RMS SDK leveraging functionality exposed by the client in Msdrm.dll is available for use in Windows Server 2008, Windows Vista, Windows Server 2008 R2, Windows 7, Windows Server 2012, and Windows 8. It may be altered or unavailable in subsequent versions. Instead, use Active Directory Rights Management Services SDK 2.1, which leverages functionality exposed by the client in Msipc.dll.]

The DRMGetUsers function retrieves a specific user from an issuance license.

Syntax


HRESULT DRMGetUsers(
  _In_  DRMPUBHANDLE hIssuanceLicense,
  _In_  UINT         uIndex,
  _Out_ DRMPUBHANDLE *phUser
);

Parameters

hIssuanceLicense [in]

The handle of the issuance license to retrieve the user from.

uIndex [in]

The zero-based index of the user in the issuance license to retrieve. To enumerate all the users in the issuance license, create a loop starting at zero and incrementing by one. When the function returns E_DRM_NO_MORE_DATA, there are no more users in the issuance license.

phUser [out]

A pointer to a DRMPUBHANDLE value that receives the handle to the requested user. Call DRMClosePubHandle to close the handle.

Return value

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.

Return codeDescription
E_DRM_NO_MORE_DATA

The index number requested lies beyond the valid range.

 

Remarks

To enumerate all the users in the issuance license, create a loop starting at zero and incrementing by one. When the function returns E_DRM_NO_MORE_DATA, there are no more users in the issuance license. Call DRMClosePubHandle to close the user handle created by calling this function.

Requirements

Product

Rights Management Services client 1.0 SP2 or later

Header

Msdrm.h

Library

Msdrm.lib

DLL

Msdrm.dll

See also

AD RMS Functions
DRMGetUserInfo
DRMGetUserRights

 

 

Show:
© 2015 Microsoft