Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.6 KiB

  1. //*****************************************************************************
  2. //
  3. // SUBCLASSING -
  4. //
  5. // Support for subclassing of 32bit standard (predefined) classes by
  6. // WOW apps.
  7. //
  8. //
  9. // 01-10-92 NanduriR Created.
  10. //
  11. //*****************************************************************************
  12. typedef struct {
  13. DWORD Proc16;
  14. DWORD Proc32;
  15. } THUNKWNDPROC, FAR *LPTHUNKWNDPROC;
  16. DWORD GetStdClassThunkWindowProc(LPSTR lpstrClass, PWW pww, HANDLE h32);
  17. DWORD IsStdClassThunkWindowProc(DWORD Proc16, PINT piClass);
  18. DWORD GetStdClass32WindowProc( INT iWOWClass ) ;
  19. #define THUNKWP_SIZE 0x30 /* Code size of a thunk */
  20. #define THUNKWP_BLOCK ((INT)(4096 / sizeof(TWPLIST))) /* Number of thunks per block */
  21. typedef struct _twpList {
  22. VPVOID vpfn16; /* 16-bit proc address */
  23. VPVOID vptwpNext; /* Pointer to next proc in the list */
  24. HWND hwnd32; /* 32-bit window handle */
  25. DWORD dwMagic; /* Magic identifier */
  26. INT iClass; /* Class of original proc */
  27. DWORD lpfn32; /* 32-bit proc address, 0 means available */
  28. BYTE Code[THUNKWP_SIZE]; /* Code for the thunk */
  29. } TWPLIST, *LPTWPLIST;
  30. #define SUBCLASS_MAGIC 0x534C4353 /* "SCLS" Sub-Class magic value */
  31. DWORD GetThunkWindowProc( DWORD Proc32, LPSTR lpszClass, PWW pww, HWND hwnd32 );
  32. BOOL FreeThunkWindowProc( DWORD Proc16 );
  33. void W32FreeThunkWindowProc( DWORD Proc32, DWORD Proc16 );
  34. DWORD IsThunkWindowProc( DWORD Proc16, PINT piClass );