/[rdesktop]/sourceforge.net/trunk/seamlessrdp/ServerExe/HookDll/hookdll.cpp
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/HookDll/hookdll.cpp

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

revision 936 by astrand, Thu Jun 30 14:46:14 2005 UTC revision 937 by astrand, Fri Jul 1 06:50:52 2005 UTC
# Line 20  Line 20 
20  // Shared DATA  // Shared DATA
21  #pragma data_seg ( "SHAREDDATA" )  #pragma data_seg ( "SHAREDDATA" )
22    
23          // this is the total number of processes this dll is currently attached to  // this is the total number of processes this dll is currently attached to
24  int iInstanceCount = 0;  int iInstanceCount = 0;
25  HWND hWnd = 0;  HWND hWnd = 0;
26    
# Line 41  BOOL APIENTRY DllMain(HINSTANCE hinstDLL Line 41  BOOL APIENTRY DllMain(HINSTANCE hinstDLL
41                        LPVOID lpReserved)                        LPVOID lpReserved)
42  {  {
43      switch (ul_reason_for_call) {      switch (ul_reason_for_call) {
44      case DLL_PROCESS_ATTACH:      case DLL_PROCESS_ATTACH: {
         {  
45              // remember our instance handle              // remember our instance handle
46              hInst = hinstDLL;              hInst = hinstDLL;
47              ++iInstanceCount;              ++iInstanceCount;
# Line 54  BOOL APIENTRY DllMain(HINSTANCE hinstDLL Line 53  BOOL APIENTRY DllMain(HINSTANCE hinstDLL
53          break;          break;
54      case DLL_THREAD_DETACH:      case DLL_THREAD_DETACH:
55          break;          break;
56      case DLL_PROCESS_DETACH:      case DLL_PROCESS_DETACH: {
         {  
57              --iInstanceCount;              --iInstanceCount;
58              CloseVirtualChannel();              CloseVirtualChannel();
59          }          }
# Line 183  LRESULT CALLBACK CbtProc(int nCode, WPAR Line 181  LRESULT CALLBACK CbtProc(int nCode, WPAR
181          //get operation type(min,max). if max, do not clip at all,if min use window's previous coords          //get operation type(min,max). if max, do not clip at all,if min use window's previous coords
182          //codes are:          //codes are:
183    
184          // SW_HIDE= 0  SW_SHOWNORMAL=1  SW_NORMAL=1  SW_SHOWMINIMIZED=2  SW_SHOWMAXIMIZED=3  SW_MAXIMIZE=3          // SW_HIDE= 0  SW_SHOWNORMAL=1  SW_NORMAL=1  SW_SHOWMINIMIZED=2  SW_SHOWMAXIMIZED=3  SW_MAXIMIZE=3
185          // SW_SHOWNOACTIVATE=4  SW_SHOW=5  SW_MINIMIZE=6  SW_SHOWMINNOACTIVE=7  SW_SHOWNA=8  SW_RESTORE=9            // SW_SHOWNOACTIVATE=4  SW_SHOW=5  SW_MINIMIZE=6  SW_SHOWMINNOACTIVE=7  SW_SHOWNA=8  SW_RESTORE=9
186          // SW_SHOWDEFAULT=10  SW_FORCEMINIMIZE=11  SW_MAX=11              // SW_SHOWDEFAULT=10  SW_FORCEMINIMIZE=11  SW_MAX=11
187    
188          itoa((int) lParam, type, 10);          itoa((int) lParam, type, 10);
189    
# Line 464  int OpenVirtualChannel() Line 462  int OpenVirtualChannel()
462    
463      if (m_vcHandle == NULL) {      if (m_vcHandle == NULL) {
464          return 0;          return 0;
465      }      } else {
     else {  
466          return 1;          return 1;
467      }      }
468  }  }
# Line 478  int CloseVirtualChannel() Line 475  int CloseVirtualChannel()
475    
476      if (result) {      if (result) {
477          return 1;          return 1;
478      }      } else {
     else {  
479          return 0;          return 0;
480      }      }
481  }  }
# Line 488  int ChannelIsOpen() Line 484  int ChannelIsOpen()
484  {  {
485      if (m_vcHandle == NULL) {      if (m_vcHandle == NULL) {
486          return 0;          return 0;
487      }      } else {
     else {  
488          return 1;          return 1;
489      }      }
490  }  }
# Line 505  int WriteToChannel(PCHAR buffer) Line 500  int WriteToChannel(PCHAR buffer)
500    
501      if (result) {      if (result) {
502          return 1;          return 1;
503      }      } else {
     else {  
504          return 0;          return 0;
505      }      }
506  }  }

Legend:
Removed from v.936  
changed lines
  Added in v.937

  ViewVC Help
Powered by ViewVC 1.1.26