home *** CD-ROM | disk | FTP | other *** search
/ Windows Graphics Programming / Feng_Yuan_Win32_GDI_DirectX.iso / Samples / Chapt_03 / Fosterer / Host.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-11  |  2.0 KB  |  66 lines

  1. #pragma once
  2.  
  3. //-----------------------------------------------------------------------------------//
  4. //              Windows Graphics Programming: Win32 GDI and DirectDraw               //
  5. //                             ISBN  0-13-086985-6                                   //
  6. //                                                                                   //
  7. //  Written            by  Yuan, Feng                             www.fengyuan.com   //
  8. //  Copyright (c) 2000 by  Hewlett-Packard Company                www.hp.com         //
  9. //  Published          by  Prentice Hall PTR, Prentice-Hall, Inc. www.phptr.com      //
  10. //                                                                                   //
  11. //  FileName   : host.h                                                                 //
  12. //  Description: KHost class                                                         //
  13. //  Version    : 1.00.000, May 31, 2000                                              //
  14. //-----------------------------------------------------------------------------------//
  15.  
  16.  
  17. #include "device.h"
  18. #include "..\Periscope\\Periscope.h"
  19.  
  20.  
  21. class KPeriscopeClient : public KDevice
  22. {
  23. public:
  24.     KPeriscopeClient(const TCHAR * DeviceName) : KDevice(DeviceName)
  25.     {
  26.     }
  27.  
  28.     ULONG Read(void * dst, const void * src, unsigned len);
  29. };
  30.  
  31.  
  32. class KImageModule;
  33.  
  34.  
  35. class KHost
  36. {
  37. public:
  38.     
  39.     KImageModule     * pWin32k;
  40.     KPeriscopeClient * pScope;
  41.     HWND               hwndOutput;
  42.     HWND               hwndLog;
  43.     HANDLE               hProcess;
  44.  
  45.     KHost()
  46.     {
  47.         pWin32k    = NULL;
  48.         pScope     = NULL;
  49.         hwndOutput = NULL;
  50.         hwndLog    = NULL;
  51.         hProcess   = NULL;
  52.     }
  53.  
  54.     void WndOutput(HWND hWnd, const char * format, va_list argptr);
  55.     void Log(const char * format, ...);
  56.     
  57.     void     ExtOutput(const char * format, ...);
  58.     unsigned ExtGetExpression(const char * expr);
  59.     bool     ExtReadProcessMemory(const void * address, 
  60.                 unsigned * buffer, unsigned count, 
  61.                 unsigned long * bytesread);
  62. };
  63.  
  64. extern KHost                 theHost;
  65. extern WINDBG_EXTENSION_APIS ExtensionAPI;
  66.