CVS: seamlessrdp/ServerExe/HookDll hook.cpp,1.3,1.4 hook.h,1.3,1.4 hookdll.cpp,1.3,1.4

Peter Åstrand <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/seamlessrdp/ServerExe/HookDll
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30095/ServerExe/HookDll

Modified Files:
	hook.cpp hook.h hookdll.cpp 
Log Message:
Indenting with astyle instead of indent

Index: hook.cpp
===================================================================
RCS file: /cvsroot/rdesktop/seamlessrdp/ServerExe/HookDll/hook.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** hook.cpp	30 Jun 2005 14:46:14 -0000	1.3
--- hook.cpp	1 Jul 2005 06:50:52 -0000	1.4
***************
*** 28,34 ****
          // check number of instances
          if (!
!             (mGetInstanceCount =
!              (GETINSTANCECOUNT) GetProcAddress(mCbtDllHinst,
!                                                "GetInstanceCount")))
              break;
  
--- 28,34 ----
          // check number of instances
          if (!
!                 (mGetInstanceCount =
!                      (GETINSTANCECOUNT) GetProcAddress(mCbtDllHinst,
!                                                        "GetInstanceCount")))
              break;
  
***************
*** 36,47 ****
          // get our hook function
          if (!
!             (mSetCbtHook =
!              (SETHOOKS) GetProcAddress(mCbtDllHinst, "SetCbtHook")))
              break;
  
          // get our unkook function
          if (!
!             (mRemoveCbtHook =
!              (REMOVEHOOKS) GetProcAddress(mCbtDllHinst, "RemoveCbtHook")))
              break;
  
--- 36,47 ----
          // get our hook function
          if (!
!                 (mSetCbtHook =
!                      (SETHOOKS) GetProcAddress(mCbtDllHinst, "SetCbtHook")))
              break;
  
          // get our unkook function
          if (!
!                 (mRemoveCbtHook =
!                      (REMOVEHOOKS) GetProcAddress(mCbtDllHinst, "RemoveCbtHook")))
              break;
  

Index: hook.h
===================================================================
RCS file: /cvsroot/rdesktop/seamlessrdp/ServerExe/HookDll/hook.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** hook.h	30 Jun 2005 14:46:14 -0000	1.3
--- hook.h	1 Jul 2005 06:50:52 -0000	1.4
***************
*** 15,56 ****
  #include "hookdll.h"
  
! // 
  // a wrapper class to access the WTSWinClipperdll
  //
  class WTSWinClipper
  {
!   protected:
!     static HINSTANCE mCbtDllHinst;
!     static SETHOOKS mSetCbtHook;
!     static REMOVEHOOKS mRemoveCbtHook;
!     static GETINSTANCECOUNT mGetInstanceCount;
  
!   public:
!     static bool Init();
!     static void Done()
!     {
!         if (mCbtDllHinst)
!             FreeLibrary(mCbtDllHinst);
!     }
  
!     static void SetCbtHook()
!     {
!         if (mCbtDllHinst)
!             mSetCbtHook();
!     }
  
!     static void RemoveCbtHook()
!     {
!         if (mCbtDllHinst)
!             mRemoveCbtHook();
!     }
  
!     static int GetInstanceCount()
!     {
!         if (mCbtDllHinst)
!             return mGetInstanceCount();
!         else
!             return 0;
!     }
  };
  
--- 15,56 ----
  #include "hookdll.h"
  
! //
  // a wrapper class to access the WTSWinClipperdll
  //
  class WTSWinClipper
  {
!     protected:
!         static HINSTANCE mCbtDllHinst;
!         static SETHOOKS mSetCbtHook;
!         static REMOVEHOOKS mRemoveCbtHook;
!         static GETINSTANCECOUNT mGetInstanceCount;
  
!     public:
!         static bool Init();
!         static void Done()
!         {
!             if (mCbtDllHinst)
!                 FreeLibrary(mCbtDllHinst);
!         }
  
!         static void SetCbtHook()
!         {
!             if (mCbtDllHinst)
!                 mSetCbtHook();
!         }
  
!         static void RemoveCbtHook()
!         {
!             if (mCbtDllHinst)
!                 mRemoveCbtHook();
!         }
  
!         static int GetInstanceCount()
!         {
!             if (mCbtDllHinst)
!                 return mGetInstanceCount();
!             else
!                 return 0;
!         }
  };
  

Index: hookdll.cpp
===================================================================
RCS file: /cvsroot/rdesktop/seamlessrdp/ServerExe/HookDll/hookdll.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** hookdll.cpp	30 Jun 2005 14:46:14 -0000	1.3
--- hookdll.cpp	1 Jul 2005 06:50:52 -0000	1.4
***************
*** 21,25 ****
  #pragma data_seg ( "SHAREDDATA" )
  
!         // this is the total number of processes this dll is currently attached to
  int iInstanceCount = 0;
  HWND hWnd = 0;
--- 21,25 ----
  #pragma data_seg ( "SHAREDDATA" )
  
! // this is the total number of processes this dll is currently attached to
  int iInstanceCount = 0;
  HWND hWnd = 0;
***************
*** 42,47 ****
  {
      switch (ul_reason_for_call) {
!     case DLL_PROCESS_ATTACH:
!         {
              // remember our instance handle
              hInst = hinstDLL;
--- 42,46 ----
  {
      switch (ul_reason_for_call) {
!     case DLL_PROCESS_ATTACH: {
              // remember our instance handle
              hInst = hinstDLL;
***************
*** 55,60 ****
      case DLL_THREAD_DETACH:
          break;
!     case DLL_PROCESS_DETACH:
!         {
              --iInstanceCount;
              CloseVirtualChannel();
--- 54,58 ----
      case DLL_THREAD_DETACH:
          break;
!     case DLL_PROCESS_DETACH: {
              --iInstanceCount;
              CloseVirtualChannel();
***************
*** 184,190 ****
          //codes are:
  
!         // SW_HIDE= 0  SW_SHOWNORMAL=1  SW_NORMAL=1  SW_SHOWMINIMIZED=2  SW_SHOWMAXIMIZED=3  SW_MAXIMIZE=3 
!         // SW_SHOWNOACTIVATE=4  SW_SHOW=5  SW_MINIMIZE=6  SW_SHOWMINNOACTIVE=7  SW_SHOWNA=8  SW_RESTORE=9  
!         // SW_SHOWDEFAULT=10  SW_FORCEMINIMIZE=11  SW_MAX=11    
  
          itoa((int) lParam, type, 10);
--- 182,188 ----
          //codes are:
  
!         // SW_HIDE= 0  SW_SHOWNORMAL=1  SW_NORMAL=1  SW_SHOWMINIMIZED=2  SW_SHOWMAXIMIZED=3  SW_MAXIMIZE=3
!         // SW_SHOWNOACTIVATE=4  SW_SHOW=5  SW_MINIMIZE=6  SW_SHOWMINNOACTIVE=7  SW_SHOWNA=8  SW_RESTORE=9
!         // SW_SHOWDEFAULT=10  SW_FORCEMINIMIZE=11  SW_MAX=11
  
          itoa((int) lParam, type, 10);
***************
*** 465,470 ****
      if (m_vcHandle == NULL) {
          return 0;
!     }
!     else {
          return 1;
      }
--- 463,467 ----
      if (m_vcHandle == NULL) {
          return 0;
!     } else {
          return 1;
      }
***************
*** 479,484 ****
      if (result) {
          return 1;
!     }
!     else {
          return 0;
      }
--- 476,480 ----
      if (result) {
          return 1;
!     } else {
          return 0;
      }
***************
*** 489,494 ****
      if (m_vcHandle == NULL) {
          return 0;
!     }
!     else {
          return 1;
      }
--- 485,489 ----
      if (m_vcHandle == NULL) {
          return 0;
!     } else {
          return 1;
      }
***************
*** 506,511 ****
      if (result) {
          return 1;
!     }
!     else {
          return 0;
      }
--- 501,505 ----
      if (result) {
          return 1;
!     } else {
          return 0;
      }



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.