Exposed WTSVirtualChannelManagerOpen

This commit is contained in:
akallabeth
2022-06-23 09:17:49 +02:00
committed by akallabeth
parent c698f7e7d9
commit 40723606e4
2 changed files with 8 additions and 3 deletions

View File

@@ -63,6 +63,7 @@ extern "C"
"Use WTSVirtualChannelManagerGetEventHandle",
void WTSVirtualChannelManagerGetFileDescriptor(HANDLE hServer, void** fds, int* fds_count));
#endif
FREERDP_API BOOL WTSVirtualChannelManagerOpen(HANDLE hServer);
FREERDP_API BOOL WTSVirtualChannelManagerCheckFileDescriptor(HANDLE hServer);
FREERDP_API BOOL WTSVirtualChannelManagerCheckFileDescriptorEx(HANDLE hServer, BOOL autoOpen);
FREERDP_API HANDLE WTSVirtualChannelManagerGetEventHandle(HANDLE hServer);

View File

@@ -529,14 +529,18 @@ void WTSVirtualChannelManagerGetFileDescriptor(HANDLE hServer, void** fds, int*
}
#endif
static BOOL WTSVirtualChannelManagerOpen(WTSVirtualChannelManager* vcm)
BOOL WTSVirtualChannelManagerOpen(HANDLE hServer)
{
WTSVirtualChannelManager* vcm = (WTSVirtualChannelManager*)hServer;
const freerdp_peer* client;
if (!vcm)
return FALSE;
WINPR_ASSERT(vcm->client);
client = vcm->client;
if ((vcm->drdynvc_state == DRDYNVC_STATE_NONE) && vcm->client->activated)
if (vcm->drdynvc_state == DRDYNVC_STATE_NONE)
{
rdpPeerChannel* channel;
UINT32 dynvc_caps;
@@ -573,7 +577,7 @@ BOOL WTSVirtualChannelManagerCheckFileDescriptorEx(HANDLE hServer, BOOL autoOpen
if (autoOpen)
{
if (!WTSVirtualChannelManagerOpen(vcm))
if (!WTSVirtualChannelManagerOpen(hServer))
return FALSE;
}