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.

77 lines
2.1 KiB

  1. #ifndef _HXX_DLL
  2. #define _HXX_DLL
  3. //+---------------------------------------------------------------------------
  4. //
  5. // Microsoft Windows
  6. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  7. //
  8. // File: dll.hxx
  9. //
  10. // Contents: Project wide private global declarations and exports from
  11. // dll directory
  12. //
  13. // History: 1-26-94 adams Created
  14. // 6-Jun-94 doncl bracketed g_cs extern declaration with
  15. // #if DBG==1
  16. // 13-Jul-94 doncl changed g_cs to g_csDP, added g_csOT
  17. //
  18. //
  19. //----------------------------------------------------------------------------
  20. //+------------------------------------------------------------------------
  21. //
  22. // Globals in DLL
  23. //
  24. //-------------------------------------------------------------------------
  25. extern HINSTANCE g_hInst; // Instance of dll
  26. #if DBG==1
  27. extern CRITICAL_SECTION g_csDP; // for debugprint
  28. extern CRITICAL_SECTION g_csOT; // for otracker
  29. extern CRITICAL_SECTION g_csNew; // for debug new
  30. #endif
  31. extern CRITICAL_SECTION g_csMem; // for MemAlloc
  32. //
  33. // Functions to manipulate object count variable g_ulObjCount. This variable
  34. // is used in the implementation of DllCanUnloadNow.
  35. // NOTE: Please leave the externs within the functions so that it is not
  36. // visible outside the dll project.
  37. //
  38. inline void
  39. INC_OBJECT_COUNT(void)
  40. {
  41. extern ULONG g_ulObjCount;
  42. g_ulObjCount++;
  43. }
  44. inline void
  45. DEC_OBJECT_COUNT(void)
  46. {
  47. extern ULONG g_ulObjCount;
  48. ADsAssert(g_ulObjCount > 0);
  49. g_ulObjCount--;
  50. }
  51. inline ULONG
  52. GET_OBJECT_COUNT(void)
  53. {
  54. extern ULONG g_ulObjCount;
  55. return g_ulObjCount;
  56. }
  57. //+------------------------------------------------------------------------
  58. //
  59. // Dll project function exports
  60. //
  61. //-------------------------------------------------------------------------
  62. int GetCachedClsidIndex(REFCLSID clsid);
  63. IClassFactory * GetCachedClassFactory(int iclsid);
  64. void GetCachedClsid(int iclsid, CLSID * pclsid);
  65. #endif // #ifndef _HXX_DLL