Source code of Windows XP (NT5)
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.

101 lines
3.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. bltinit.hxx
  7. Include file for BLT module bltinit.cxx.
  8. These are the public hooks only. See class BLTIMP in the implentation
  9. for more fun.
  10. FILE HISTORY:
  11. Johnl 13-Mar-1991 Created
  12. beng 14-May-1991 Hacked for standalone compilation
  13. beng 18-Sep-1991 Add another ctor state
  14. beng 17-Oct-1991 SLT_PLUS withdrawn to APPLIBW
  15. beng 16-Mar-1992 Changed cdebug
  16. beng 31-Jul-1992 Registration model changed;
  17. withdrew all compatibility routines
  18. */
  19. #ifndef _BLT_HXX_
  20. #error "Don't include this file directly; instead, include it through blt.hxx"
  21. #endif // _BLT_HXX_
  22. #ifndef _BLTINIT_HXX_
  23. #define _BLTINIT_HXX
  24. #include "bltidres.hxx"
  25. /*************************************************************************
  26. NAME: BLT
  27. SYNOPSIS: Encapsulate BLT namespace, package init/term
  28. INTERFACE:
  29. Init() - init package for app
  30. Term() - cleanup for app
  31. MapLastError() - return the last error (best guess)
  32. CalcHmodRsrc() - calculate hmod from a resource ID
  33. CalcHmodString()
  34. NOTES:
  35. An application should call Register upon entry
  36. and Deregister upon exit. The hInst passed to Register
  37. is the hInst handle from the WinMain or LibMain entry
  38. points.
  39. All members are static.
  40. HISTORY:
  41. beng 29-Jul-1991 Created to hide some globals
  42. beng 25-Oct-1991 Removed fRealMode from Win32;
  43. added debugging support
  44. beng 30-Oct-1991 Completely withdrew fRealMode; rename
  45. Register/Deregister to Init/Term
  46. beng 01-Nov-1991 Add MapLastError
  47. beng 16-Mar-1992 Changed cdebug implementation
  48. beng 31-Jul-1992 Removed most of this to BLTIMP;
  49. major dllization changes
  50. KeithMo 07-Aug-1992 Added RegisterHelpFile.
  51. Johnl 25-Nov-1992 Added InitDLL & TermDLL
  52. **************************************************************************/
  53. DLL_CLASS BLT
  54. {
  55. public:
  56. //
  57. // InitDLL is called during process attach time for lmuicmn0.dll
  58. // TermDLL is called during process detach time for lmuicmn0.dll
  59. //
  60. static APIERR InitDLL( void ) ;
  61. static VOID TermDLL( void ) ;
  62. static APIERR Init( HINSTANCE hInst, UINT idMinR, UINT idMaxR,
  63. UINT idMinS, UINT idMaxS );
  64. static VOID Term( HINSTANCE hInst );
  65. static APIERR RegisterHelpFile( HMODULE hMod,
  66. MSGID idsHelpFile,
  67. ULONG nMinHC,
  68. ULONG nMaxHC );
  69. static VOID DeregisterHelpFile( HMODULE hMod,
  70. ULONG hc );
  71. static HMODULE CalcHmodRsrc( const IDRESOURCE & id );
  72. static HMODULE CalcHmodString( MSGID id );
  73. static const TCHAR * CalcHelpFileHC( ULONG nHelpContext );
  74. static APIERR MapLastError( APIERR errBestGuess );
  75. };
  76. #endif // _BLTINIT_HXX_ - end of file