home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / msinc.pak / W32SUT.H < prev    next >
C/C++ Source or Header  |  1997-07-23  |  2KB  |  85 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. /*
  14.  *      C/C++ Run Time Library - Version 6.5
  15.  *
  16.  *      Copyright (c) 1994 by Borland International
  17.  *      All Rights Reserved.
  18.  *
  19.  */
  20.  
  21. /* Check that one of the 2 constants is defined  */
  22. #ifdef W32SUT_16
  23. #ifdef W32SUT_32
  24. #error W32SUT_16 and W32SUT_32 cannot be defined simultaneously
  25. #endif
  26. #endif
  27.  
  28. #ifndef W32SUT_16
  29. #ifndef W32SUT_32
  30. #error  Either W32SUT_16 or W32SUT_32 should be defined
  31. #endif
  32. #endif
  33.  
  34.  
  35. #if defined(__cplusplus)
  36. extern "C" {
  37. #endif
  38.  
  39.  
  40. /****      Prototypes for 32 bit DLL   ***********/
  41. #ifdef W32SUT_32
  42.  
  43. #ifndef __WINBASE_H
  44. #include <winbase.h>
  45. #endif
  46.  
  47. typedef DWORD  ( WINAPI * UT32PROC)( LPVOID lpBuff,
  48.                                      DWORD  dwUserDefined,
  49.                                      LPVOID *lpTranslationList
  50.                                    );
  51.  
  52. BOOL    WINAPI UTRegister( HANDLE     hModule,
  53.                            LPCSTR     lpsz16BitDLL,
  54.                            LPCSTR     lpszInitName,
  55.                            LPCSTR     lpszProcName,
  56.                            UT32PROC * ppfn32Thunk,
  57.                            FARPROC    pfnUT32Callback,
  58.                            LPVOID     lpBuff
  59.                          );
  60.  
  61.  
  62. VOID    WINAPI UTUnRegister(HANDLE hModule);
  63.  
  64. #endif
  65.  
  66.  
  67. /****      Prototypes for 16 bit DLL   ***********/
  68. #ifdef W32SUT_16
  69.  
  70. typedef DWORD (FAR PASCAL  * UT16CBPROC)( LPVOID lpBuff,
  71.                                           DWORD  dwUserDefined,
  72.                                           LPVOID FAR *lpTranslationList
  73.                                         );
  74.  
  75.  
  76. LPVOID  WINAPI  UTLinearToSelectorOffset(LPBYTE lpByte);
  77. LPVOID  WINAPI  UTSelectorOffsetToLinear(LPBYTE lpByte);
  78.  
  79. #endif
  80.  
  81.  
  82. #if defined(__cplusplus)
  83. }
  84. #endif
  85.