home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April / Chip_1997-04_cd.bin / prezent / cb / data.z / W32SUT.H < prev    next >
C/C++ Source or Header  |  1997-01-16  |  2KB  |  79 lines

  1. /***
  2. *w32sut.h -
  3. *
  4. *Purpose:
  5. *       This file declares the constants, structures, and functions
  6. *       used for accessing and using the Universal Thunk mechanism.
  7. *
  8. *       This file should be compiled either with constants W32SUT_16 or
  9. *       W32SUT_32 defined.
  10. *
  11. ****/
  12.  
  13. /* $Copyright: 1994$ */
  14.  
  15. /* Check that one of the 2 constants is defined  */
  16. #ifdef W32SUT_16
  17. #ifdef W32SUT_32
  18. #error W32SUT_16 and W32SUT_32 cannot be defined simultaneously
  19. #endif
  20. #endif
  21.  
  22. #ifndef W32SUT_16
  23. #ifndef W32SUT_32
  24. #error  Either W32SUT_16 or W32SUT_32 should be defined
  25. #endif
  26. #endif
  27.  
  28.  
  29. #if defined(__cplusplus)
  30. extern "C" {
  31. #endif
  32.  
  33.  
  34. /****      Prototypes for 32 bit DLL   ***********/
  35. #ifdef W32SUT_32
  36.  
  37. #ifndef __WINBASE_H
  38. #include <winbase.h>
  39. #endif
  40.  
  41. typedef DWORD  ( WINAPI * UT32PROC)( LPVOID lpBuff,
  42.                                      DWORD  dwUserDefined,
  43.                                      LPVOID *lpTranslationList
  44.                                    );
  45.  
  46. BOOL    WINAPI UTRegister( HANDLE     hModule,
  47.                            LPCSTR     lpsz16BitDLL,
  48.                            LPCSTR     lpszInitName,
  49.                            LPCSTR     lpszProcName,
  50.                            UT32PROC * ppfn32Thunk,
  51.                            FARPROC    pfnUT32Callback,
  52.                            LPVOID     lpBuff
  53.                          );
  54.  
  55.  
  56. VOID    WINAPI UTUnRegister(HANDLE hModule);
  57.  
  58. #endif
  59.  
  60.  
  61. /****      Prototypes for 16 bit DLL   ***********/
  62. #ifdef W32SUT_16
  63.  
  64. typedef DWORD (FAR PASCAL  * UT16CBPROC)( LPVOID lpBuff,
  65.                                           DWORD  dwUserDefined,
  66.                                           LPVOID FAR *lpTranslationList
  67.                                         );
  68.  
  69.  
  70. LPVOID  WINAPI  UTLinearToSelectorOffset(LPBYTE lpByte);
  71. LPVOID  WINAPI  UTSelectorOffsetToLinear(LPBYTE lpByte);
  72.  
  73. #endif
  74.  
  75.  
  76. #if defined(__cplusplus)
  77. }
  78. #endif
  79.