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.

93 lines
3.2 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2002 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // Dll.h
  7. //
  8. // Description:
  9. // DLL globals definitions and macros.
  10. //
  11. // Maintained By:
  12. // Geoffrey Pease (GPease) 22-NOV-1999
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #pragma once
  16. //
  17. // DLL Globals
  18. //
  19. extern HINSTANCE g_hInstance;
  20. extern LONG g_cObjects;
  21. extern LONG g_cLock;
  22. extern WCHAR g_szDllFilename[ MAX_PATH ];
  23. extern LPVOID g_GlobalMemoryList; // Global memory tracking list
  24. //
  25. // Application ID (AppID) Macros
  26. //
  27. #define BEGIN_APPIDS const SAppIDInfo g_AppIDs[] = {
  28. #define DEFINE_APPID( _name, _rappid, _idslaunch, _idsaccess, _nauthlevel, _nrunas ) { &_rappid, _name, ( RTL_NUMBER_OF( _name ) - 1 ), _idslaunch, _idsaccess, _nauthlevel, _nrunas },
  29. #define END_APPIDS { NULL } };
  30. extern const SAppIDInfo g_AppIDs[];
  31. //
  32. // Class Table Macros
  33. //
  34. #define BEGIN_DLL_PUBLIC_CLASSES const SPublicClassInfo g_DllPublicClasses[] = {
  35. #define PUBLIC_CLASS( _name, _rclsid, _pfnCreator, _threading ) { _pfnCreator, &_rclsid, _name, ( RTL_NUMBER_OF( _name ) - 1 ), NULL, 0, _threading, NULL, NULL },
  36. #define CLASS_WITH_APPID( _name, _rclsid, _pfnCreator, _threading, _rappid ) { _pfnCreator, &_rclsid, _name, ( RTL_NUMBER_OF( _name ) - 1 ), NULL, 0, _threading, &_rappid, NULL },
  37. #define CLASS_WITH_CATID( _name, _rclsid, _pfnCreator, _threading, _pfncatreg ) { _pfnCreator, &_rclsid, _name, ( RTL_NUMBER_OF( _name ) - 1 ), NULL, 0, _threading, NULL, _pfncatreg },
  38. #define CLASS_WITH_PROGID( _name, _rclsid, _pfnCreator, _threading, _progid ) { _pfnCreator, &_rclsid, _name, ( RTL_NUMBER_OF( _name ) - 1 ), _progid, ( RTL_NUMBER_OF( _progid ) - 1 ), _threading, NULL, NULL },
  39. #define END_DLL_PUBLIC_CLASSES { NULL } };
  40. extern const SPublicClassInfo g_DllPublicClasses[];
  41. #define BEGIN_PRIVATE_CLASSES const SPrivateClassInfo g_PrivateClasses[] = {
  42. #define PRIVATE_CLASS( _name, _rclsid, _pfnCreator ) { _pfnCreator, &_rclsid, _name, ( RTL_NUMBER_OF( _name ) - 1 ) },
  43. #define END_PRIVATE_CLASSES { NULL } };
  44. extern const SPrivateClassInfo g_PrivateClasses[];
  45. //
  46. // Category ID (CATID) Macros
  47. //
  48. #define BEGIN_CATIDTABLE const SCatIDInfo g_DllCatIds[] = {
  49. #define DEFINE_CATID( _rcatid, _name ) { &_rcatid, _name },
  50. #define END_CATIDTABLE { NULL } }; const size_t g_cDllCatIds = RTL_NUMBER_OF( g_DllCatIds ) - 1;
  51. extern const SCatIDInfo g_DllCatIds[];
  52. extern const size_t g_cDllCatIds;
  53. //
  54. // Type Library Macros
  55. //
  56. #define BEGIN_TYPELIBS const STypeLibInfo g_DllTypeLibs[] = {
  57. #define DEFINE_TYPELIB( _idlibres ) { _idlibres, FALSE },
  58. #define END_TYPELIBS { 0, TRUE } };
  59. extern const STypeLibInfo g_DllTypeLibs[];
  60. //
  61. // DLL Global Function Prototypes
  62. //
  63. HRESULT
  64. HrCoCreateInternalInstance(
  65. REFCLSID rclsidIn,
  66. LPUNKNOWN pUnkOuterIn,
  67. DWORD dwClsContextIn,
  68. REFIID riidIn,
  69. LPVOID * ppvOut
  70. );
  71. HRESULT
  72. HrCoCreateInternalInstanceEx(
  73. REFCLSID rclsidIn,
  74. LPUNKNOWN pUnkOuterIn,
  75. DWORD dwClsContextIn,
  76. COSERVERINFO * pServerInfoIn,
  77. ULONG cMultiQIsIn,
  78. MULTI_QI * prgmqiInOut
  79. );