WTSQueryListenerConfigW function (wtsapi32.h)
Retrieves configuration information for a Remote Desktop Services listener.
Syntax
BOOL WTSQueryListenerConfigW(
[in] HANDLE hServer,
[in] PVOID pReserved,
[in] DWORD Reserved,
[in] LPWSTR pListenerName,
[out] PWTSLISTENERCONFIGW pBuffer
);
Parameters
[in] hServer
A handle to an RD Session Host server. Always set this parameter to WTS_CURRENT_SERVER_HANDLE.
[in] pReserved
This parameter is reserved. Always set this parameter to NULL.
[in] Reserved
This parameter is reserved. Always set this parameter to zero.
[in] pListenerName
A pointer to a null-terminated string that contains the name of the listener to query.
[out] pBuffer
A pointer to a WTSLISTENERCONFIG structure that receives the retrieved listener configuration information.
Return value
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call the GetLastError function.
Remarks
This function does not retrieve the security descriptor for the listener. To retrieve the security descriptor, call the WTSGetListenerSecurity function.
Note
The wtsapi32.h header defines WTSQueryListenerConfig as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 |
Minimum supported server | Windows Server 2008 R2 |
Target Platform | Windows |
Header | wtsapi32.h |
Library | Wtsapi32.lib |
DLL | Wtsapi32.dll |