Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

TLSLicenseEnumBegin function

Begins enumeration of licenses that are issued by the Remote Desktop license server based on search criteria.

Note  This function has no associated header file or import library. To call this function, you must create a user-defined header file and use the LoadLibrary and GetProcAddress functions to dynamically link to Mstlsapi.dll.

Syntax


DWORD WINAPI TLSLicenseEnumBegin(
  _In_   TLS_HANDLE hHandle,
  _In_   DWORD dwSearchParm,
  _In_   BOOL bMatchAll,
  _In_   LSLicense *lpSearchParm,
  _Out_  PDWORD pdwErrCode
);

Parameters

hHandle [in]

Handle to a Remote Desktop license server. Specify a handle that is opened by the TLSConnectToLsServer function.

dwSearchParm [in]

Specifies the search criteria. The parameter can be one or a combination of the values that are described in the following table. The parameter specifies the type of key pack and which key pack to search.

ValueMeaning
LSLICENSE_SEARCH_LICENSEID
0x00000001

Search by license ID.

LSLICENSE_SEARCH_KEYPACKID
0x00000002

Search by key pack ID.

LSLICENSE_SEARCH_MACHINENAME
0x00000008

Search by machine name.

LSLICENSE_SEARCH_USERNAME
0x00000010

Search by user name.

LSLICENSE_SEARCH_ISSUEDATE
0x00000080

Search by issue date.

LSLICENSE_SEARCH_EXPIREDATE
0x00000100

Search by expiration date.

LSLICENSE_SEARCH_ NUMLICENSES
0x00000200

Search by number of licenses.

LSLICENSE_SEARCH_ ENTRY_STATUS
0x20000000

Search by entry status.

LSLICENSE_EXSEARCH_LICENSESTATUS
0x00100000

Search by license status.

LSKEYPACK_SEARCH_ALL
0xFFFFFFFF

Search all licenses.

 

bMatchAll [in]

Specifies whether to match all search values.

lpSearchParm [in]

Pointer to a LSLicense structure that specifies the search parameters to look for.

pdwErrCode [out]

Pointer to a variable that receives one of the following error codes on return.

ValueMeaning
LSERVER_S_SUCCESS
0

Call is successful.

LSERVER_E_INTERNAL_ERROR
5001

Internal error in license server.

LSERVER_E_INVALID_SEQUENCE
5006

The calling sequence was not valid. Most likely, a previous enumeration has not ended.

LSERVER_E_SERVER_BUSY
5007

License server is too busy to process the request.

LSERVER_E_OUTOFMEMORY
5008

Cannot process the request because of insufficient memory.

LSERVER_E_INVALID_DATA
5009

Data in the search parameter is not valid.

 

Return value

This function returns the following possible return values.

Return codeDescription
RPC_S_OK

The call succeeded. Check the value of the pdwErrCode parameter to get the return code for the call.

RPC_S_INVALID_ARG

The argument was not valid.

 

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

DLL

Mstlsapi.dll

See also

LSLicense
TLSConnectToLsServer
TLSLicenseEnumNext
TLSLicenseEnumEnd

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.