diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c index 7948db0f9..164a08ccf 100644 --- a/server/Sample/sfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -30,6 +30,9 @@ #include #include +#include +#include + #include #include @@ -450,7 +453,6 @@ static void* tf_debug_channel_thread_func(void* arg) BOOL tf_peer_post_connect(freerdp_peer* client) { - int i; testPeerContext* context = (testPeerContext*) client->context; /** @@ -492,7 +494,7 @@ BOOL tf_peer_post_connect(freerdp_peer* client) if (WTSVirtualChannelManagerIsChannelJoined(context->vcm, "rdpdbg")) { - context->debug_channel = WTSVirtualChannelManagerOpenEx(context->vcm, "rdpdbg", 0); + context->debug_channel = WTSVirtualChannelOpen(context->vcm, WTS_CURRENT_SESSION, "rdpdbg"); if (context->debug_channel != NULL) { @@ -825,6 +827,7 @@ int main(int argc, char* argv[]) { freerdp_listener* instance; + WTSRegisterWtsApiFunctionTable(FreeRDP_InitWtsApi()); instance = freerdp_listener_new(); instance->PeerAccepted = test_peer_accepted; diff --git a/server/Sample/sfreerdp.h b/server/Sample/sfreerdp.h index b54af158d..a052da93d 100644 --- a/server/Sample/sfreerdp.h +++ b/server/Sample/sfreerdp.h @@ -48,7 +48,7 @@ struct test_peer_context BOOL activated; HANDLE event; HANDLE stopEvent; - WTSVirtualChannelManager* vcm; + HANDLE vcm; void* debug_channel; HANDLE debug_channel_thread; audin_server_context* audin;