/[rdesktop]/sourceforge.net/trunk/seamlessrdp/ServerExe/main.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/main.c

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

revision 1159 by ossman_, Fri Mar 17 13:11:20 2006 UTC revision 1160 by ossman_, Fri Mar 17 16:23:08 2006 UTC
# Line 51  typedef int (*get_instance_count_proc_t) Line 51  typedef int (*get_instance_count_proc_t)
51  typedef void (*move_window_proc_t) (HWND hwnd, int x, int y, int width, int height);  typedef void (*move_window_proc_t) (HWND hwnd, int x, int y, int width, int height);
52  typedef void (*zchange_proc_t) (HWND hwnd, HWND behind);  typedef void (*zchange_proc_t) (HWND hwnd, HWND behind);
53  typedef void (*focus_proc_t) (HWND hwnd);  typedef void (*focus_proc_t) (HWND hwnd);
54    typedef void (*set_state_proc_t) (HWND hwnd, int state);
55    
56  static move_window_proc_t g_move_window_fn = NULL;  static move_window_proc_t g_move_window_fn = NULL;
57  static zchange_proc_t g_zchange_fn = NULL;  static zchange_proc_t g_zchange_fn = NULL;
58  static focus_proc_t g_focus_fn = NULL;  static focus_proc_t g_focus_fn = NULL;
59    static set_state_proc_t g_set_state_fn = NULL;
60    
61  static void  static void
62  message(const char *text)  message(const char *text)
# Line 149  do_sync(void) Line 151  do_sync(void)
151  static void  static void
152  do_state(HWND hwnd, int state)  do_state(HWND hwnd, int state)
153  {  {
154          if (state == 0)          g_set_state_fn(hwnd, state);
                 ShowWindow(hwnd, SW_RESTORE);  
         else if (state == 1)  
                 ShowWindow(hwnd, SW_MINIMIZE);  
         else if (state == 2)  
                 ShowWindow(hwnd, SW_MAXIMIZE);  
         else  
                 debug("Invalid state %d sent.", state);  
155  }  }
156    
157  static void  static void
# Line 289  WinMain(HINSTANCE instance, HINSTANCE pr Line 284  WinMain(HINSTANCE instance, HINSTANCE pr
284          g_move_window_fn = (move_window_proc_t) GetProcAddress(hookdll, "SafeMoveWindow");          g_move_window_fn = (move_window_proc_t) GetProcAddress(hookdll, "SafeMoveWindow");
285          g_zchange_fn = (zchange_proc_t) GetProcAddress(hookdll, "SafeZChange");          g_zchange_fn = (zchange_proc_t) GetProcAddress(hookdll, "SafeZChange");
286          g_focus_fn = (focus_proc_t) GetProcAddress(hookdll, "SafeFocus");          g_focus_fn = (focus_proc_t) GetProcAddress(hookdll, "SafeFocus");
287            g_set_state_fn = (set_state_proc_t) GetProcAddress(hookdll, "SafeSetState");
288    
289          if (!set_hooks_fn || !remove_hooks_fn || !instance_count_fn || !g_move_window_fn          if (!set_hooks_fn || !remove_hooks_fn || !instance_count_fn || !g_move_window_fn
290              || !g_zchange_fn || !g_focus_fn)              || !g_zchange_fn || !g_focus_fn || !g_set_state_fn)
291          {          {
292                  FreeLibrary(hookdll);                  FreeLibrary(hookdll);
293                  message("Hook DLL doesn't contain the correct functions. Unable to continue.");                  message("Hook DLL doesn't contain the correct functions. Unable to continue.");

Legend:
Removed from v.1159  
changed lines
  Added in v.1160

  ViewVC Help
Powered by ViewVC 1.1.26