WTSVirtualChannelOpenEx function
Creates a virtual channel in a manner similar to WTSVirtualChannelOpen.
This API supports both static virtual channel (SVC) and dynamic virtual channel (DVC) creation. If the flags parameter is zero, it behaves the same as WTSVirtualChannelOpen. A DVC can be opened by specifying the appropriate flag. After a DVC is created, you can use the same functions for Read, Write, Query, or Close that are used for the SVC.
Syntax
HANDLE WTSVirtualChannelOpenEx( _In_ DWORD SessionId, _In_ LPSTR pVirtualName, _In_ DWORD flags );
Parameters
- SessionId [in]
-
A Remote Desktop Services session identifier. To indicate the current session, specify WTS_CURRENT_SESSION. You can use the WTSEnumerateSessions function to retrieve the identifiers of all sessions on a specified RD Session Host server.
To be able to open a virtual channel on another user's session, you must have the Virtual Channels permission. For more information, see Remote Desktop Services Permissions. To modify permissions on a session, use the Remote Desktop Services Configuration administrative tool.
- pVirtualName [in]
-
In the case of an SVC, points to a null-terminated string that contains the virtual channel name. The length of an SVC name is limited to CHANNEL_NAME_LEN characters, not including the terminating null.
In the case of a DVC, points to a null-terminated string that contains the endpoint name of the listener. The length of a DVC name is limited to MAX_PATH characters.
- flags [in]
-
To open the channel as an SVC, specify zero for this parameter. To open the channel as a DVC, specify WTS_CHANNEL_OPTION_DYNAMIC.
When opening a DVC, you can specify a priority setting for the data that is being transferred by specifying one of the WTS_CHANNEL_OPTION_DYNAMIC_PRI_XXX values in combination with the WTS_CHANNEL_OPTION_DYNAMIC value.
Return value
FALSE on error with GetLastError() set.
Requirements
|
Minimum supported client | Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2008 [desktop apps only] |
|
Version | Remote Desktop Connection (RDC) 6.1 for Windows XP (KB952155). |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 10/26/2012