/[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 1144 by ossman_, Wed Mar 15 13:45:42 2006 UTC revision 1145 by ossman_, Thu Mar 16 13:24:18 2006 UTC
# Line 38  typedef void (*set_hooks_proc_t) (); Line 38  typedef void (*set_hooks_proc_t) ();
38  typedef void (*remove_hooks_proc_t) ();  typedef void (*remove_hooks_proc_t) ();
39  typedef int (*get_instance_count_proc_t) ();  typedef int (*get_instance_count_proc_t) ();
40    
41    typedef void (*move_window_proc_t) (HWND hwnd, int x, int y, int width, int height);
42    
43    static move_window_proc_t g_move_window_fn = NULL;
44    
45  static void  static void
46  message(const char *text)  message(const char *text)
47  {  {
# Line 144  do_state(HWND hwnd, int state) Line 148  do_state(HWND hwnd, int state)
148  static void  static void
149  do_position(HWND hwnd, int x, int y, int width, int height)  do_position(HWND hwnd, int x, int y, int width, int height)
150  {  {
151          SetWindowPos(hwnd, NULL, x, y, width, height, SWP_NOACTIVATE | SWP_NOZORDER);          g_move_window_fn(hwnd, x, y, width, height);
152  }  }
153    
154  static void  static void
# Line 165  process_cmds(void) Line 169  process_cmds(void)
169    
170          while ((size = vchannel_read(line, sizeof(line))) >= 0)          while ((size = vchannel_read(line, sizeof(line))) >= 0)
171          {          {
                 debug("Got: %s", line);  
   
172                  p = line;                  p = line;
173    
174                  tok1 = get_token(&p);                  tok1 = get_token(&p);
# Line 212  WinMain(HINSTANCE instance, HINSTANCE pr Line 214  WinMain(HINSTANCE instance, HINSTANCE pr
214          set_hooks_fn = (set_hooks_proc_t) GetProcAddress(hookdll, "SetHooks");          set_hooks_fn = (set_hooks_proc_t) GetProcAddress(hookdll, "SetHooks");
215          remove_hooks_fn = (remove_hooks_proc_t) GetProcAddress(hookdll, "RemoveHooks");          remove_hooks_fn = (remove_hooks_proc_t) GetProcAddress(hookdll, "RemoveHooks");
216          instance_count_fn = (get_instance_count_proc_t) GetProcAddress(hookdll, "GetInstanceCount");          instance_count_fn = (get_instance_count_proc_t) GetProcAddress(hookdll, "GetInstanceCount");
217            g_move_window_fn = (move_window_proc_t) GetProcAddress(hookdll, "SafeMoveWindow");
218    
219          if (!set_hooks_fn || !remove_hooks_fn || !instance_count_fn)          if (!set_hooks_fn || !remove_hooks_fn || !instance_count_fn || !g_move_window_fn)
220          {          {
221                  FreeLibrary(hookdll);                  FreeLibrary(hookdll);
222                  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.1144  
changed lines
  Added in v.1145

  ViewVC Help
Powered by ViewVC 1.1.26