/[rdesktop]/sourceforge.net/trunk/seamlessrdp/ServerExe/vchannel.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/seamlessrdp/ServerExe/vchannel.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1247 by ossman_, Mon Mar 20 10:31:58 2006 UTC revision 1248 by ossman_, Wed Jul 12 12:01:56 2006 UTC
# Line 52  unsigned int g_vchannel_serial SHARED = Line 52  unsigned int g_vchannel_serial SHARED =
52    
53  static HANDLE g_mutex = NULL;  static HANDLE g_mutex = NULL;
54  static HANDLE g_vchannel = NULL;  static HANDLE g_vchannel = NULL;
55    static unsigned int g_opencount = 0;
56    
57  DLL_EXPORT void  DLL_EXPORT void
58  debug(char *format, ...)  debug(char *format, ...)
# Line 119  unicode_to_utf8(const unsigned short *st Line 120  unicode_to_utf8(const unsigned short *st
120  DLL_EXPORT int  DLL_EXPORT int
121  vchannel_open()  vchannel_open()
122  {  {
123            g_opencount++;
124            if (g_opencount > 1)
125                    return 0;
126    
127          g_vchannel = WTSVirtualChannelOpen(WTS_CURRENT_SERVER_HANDLE,          g_vchannel = WTSVirtualChannelOpen(WTS_CURRENT_SERVER_HANDLE,
128                                             WTS_CURRENT_SESSION, CHANNELNAME);                                             WTS_CURRENT_SESSION, CHANNELNAME);
129    
# Line 139  vchannel_open() Line 144  vchannel_open()
144  DLL_EXPORT void  DLL_EXPORT void
145  vchannel_close()  vchannel_close()
146  {  {
147            g_opencount--;
148            if (g_opencount > 0)
149                    return;
150    
151          if (g_mutex)          if (g_mutex)
152                  CloseHandle(g_mutex);                  CloseHandle(g_mutex);
153    

Legend:
Removed from v.1247  
changed lines
  Added in v.1248

  ViewVC Help
Powered by ViewVC 1.1.26