TLSGetServerCertificate function
Returns the certificate of the Remote Desktop license server.
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 TLSGetServerCertificate( _In_ TLS_HANDLE hHandle, _In_ BOOL bSignCert, _Out_ LPBYTE *ppbCertBlob, _Out_ LPDWORD lpdwCertBlobLen, _Out_ PDWORD pdwErrCode );
Parameters
- hHandle [in]
-
Handle to a Remote Desktop license server that is opened by a call to the TLSConnectToLsServer function.
- bSignCert [in]
-
TRUE if signature certificate, FALSE if exchange certificate.
- ppbCertBlob [out]
-
Pointer to a variable that receives a pointer to a buffer that contains the certificate.
- lpdwCertBlobLen [out]
-
Pointer to a variable that receives the size of the certificate that is returned.
- pdwErrCode [out]
-
Pointer to a variable that receives the error code.
Return value
This function returns the following possible return values.
| Return code | Description |
|---|---|
|
The call succeeded. Check the value of the pdwErrCode parameter to get the return code for the call. |
|
The argument was invalid. |
Requirements
|
Minimum supported client | Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2003 [desktop apps only] |
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 10/26/2012