/[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 1002 by astrand, Tue Aug 30 11:17:52 2005 UTC revision 1003 by astrand, Tue Aug 30 11:22:46 2005 UTC
# Line 85  LRESULT CALLBACK CallWndProc( int nCode, Line 85  LRESULT CALLBACK CallWndProc( int nCode,
85          return CallNextHookEx( hhook3, nCode, wParam, lParam );          return CallNextHookEx( hhook3, nCode, wParam, lParam );
86      }      }
87            
     PCHAR buffer = NULL;  
88      char windowTitle[ 150 ] = { ""      char windowTitle[ 150 ] = { ""
89                                };                                };
90      HWND windowHandle = NULL;      HWND windowHandle = NULL;
# Line 116  LRESULT CALLBACK CallWndProc( int nCode, Line 115  LRESULT CALLBACK CallWndProc( int nCode,
115                    rect->bottom - rect->top,                    rect->bottom - rect->top,
116                    0 );                    0 );
117          result[ sizeof( result ) - 1 ] = '\0';          result[ sizeof( result ) - 1 ] = '\0';
         buffer = result;  
118          break;          break;
119                    
120                    
# Line 143  LRESULT CALLBACK CallWndProc( int nCode, Line 141  LRESULT CALLBACK CallWndProc( int nCode,
141                        wp->flags & SWP_NOACTIVATE ? wp->hwndInsertAfter : 0,                        wp->flags & SWP_NOACTIVATE ? wp->hwndInsertAfter : 0,
142                        0 );                        0 );
143              result[ sizeof( result ) - 1 ] = '\0';              result[ sizeof( result ) - 1 ] = '\0';
             buffer = result;  
144          }          }
145          break;          break;
146                    
# Line 153  LRESULT CALLBACK CallWndProc( int nCode, Line 150  LRESULT CALLBACK CallWndProc( int nCode,
150              snprintf( result, sizeof( result ),              snprintf( result, sizeof( result ),
151                        "CREATE1,0x%p,0x%x\n",                        "CREATE1,0x%p,0x%x\n",
152                        details->hwnd, 0 );                        details->hwnd, 0 );
             buffer = result;  
153          }          }
154          break;          break;
155                    
# Line 163  LRESULT CALLBACK CallWndProc( int nCode, Line 159  LRESULT CALLBACK CallWndProc( int nCode,
159              snprintf( result, sizeof( result ),              snprintf( result, sizeof( result ),
160                        "DESTROY1,0x%p,0x%x\n",                        "DESTROY1,0x%p,0x%x\n",
161                        details->hwnd, 0 );                        details->hwnd, 0 );
             buffer = result;  
162          }          }
163                    
164          break;          break;
# Line 174  LRESULT CALLBACK CallWndProc( int nCode, Line 169  LRESULT CALLBACK CallWndProc( int nCode,
169      }      }
170            
171      if ( ChannelIsOpen() ) {      if ( ChannelIsOpen() ) {
172          if ( buffer != NULL ) {          if ( result[ 0 ] != '\0' ) {
173              WriteToChannel( buffer );              WriteToChannel( result );
174          }          }
175      }      }
176            
# Line 188  LRESULT CALLBACK CbtProc( int nCode, WPA Line 183  LRESULT CALLBACK CbtProc( int nCode, WPA
183          return CallNextHookEx( hhook, nCode, wParam, lParam );          return CallNextHookEx( hhook, nCode, wParam, lParam );
184      }      }
185            
       
     PCHAR buffer = NULL;  
       
       
186      char windowTitle[ 150 ] = { ""      char windowTitle[ 150 ] = { ""
187                                };                                };
188      HWND windowHandle = NULL;      HWND windowHandle = NULL;
# Line 214  LRESULT CALLBACK CbtProc( int nCode, WPA Line 205  LRESULT CALLBACK CbtProc( int nCode, WPA
205                    windowTitle,                    windowTitle,
206                    LOWORD( lParam ),                    LOWORD( lParam ),
207                    0 );                    0 );
         buffer = result;  
208          break;          break;
209                    
210                    
# Line 223  LRESULT CALLBACK CbtProc( int nCode, WPA Line 213  LRESULT CALLBACK CbtProc( int nCode, WPA
213      }      }
214            
215      if ( ChannelIsOpen() ) {      if ( ChannelIsOpen() ) {
216          if ( buffer != NULL ) {          if ( result[ 0 ] != '\0' ) {
217              WriteToChannel( buffer );              WriteToChannel( result );
218          }          }
219      }      }
220            
# Line 239  LRESULT CALLBACK ShellProc( int nCode, W Line 229  LRESULT CALLBACK ShellProc( int nCode, W
229      }      }
230            
231      if ( ChannelIsOpen() ) {      if ( ChannelIsOpen() ) {
         PCHAR buffer = NULL;  
           
232          char windowTitle[ 150 ] = { ""          char windowTitle[ 150 ] = { ""
233                                    };                                    };
234          HWND windowHandle = NULL;          HWND windowHandle = NULL;
# Line 296  LRESULT CALLBACK ShellProc( int nCode, W Line 284  LRESULT CALLBACK ShellProc( int nCode, W
284              strcat( result, strW );              strcat( result, strW );
285              strcat( result, "." );              strcat( result, "." );
286                            
             buffer = result;  
               
287              break;              break;
288                            
289              case HSHELL_WINDOWDESTROYED:              case HSHELL_WINDOWDESTROYED:
# Line 341  LRESULT CALLBACK ShellProc( int nCode, W Line 327  LRESULT CALLBACK ShellProc( int nCode, W
327              strcat( result, strW );              strcat( result, strW );
328              strcat( result, "." );              strcat( result, "." );
329                            
             buffer = result;  
               
330              break;              break;
331              default:              default:
332              break;              break;
333          }          }
334                    
335          if ( buffer != NULL ) {          if ( result[ 0 ] != '\0' ) {
336              WriteToChannel( buffer );              WriteToChannel( result );
337          }          }
338      }      }
339            

Legend:
Removed from v.1002  
changed lines
  Added in v.1003

  ViewVC Help
Powered by ViewVC 1.1.26