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.

99 lines
3.9 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995
  5. //
  6. // File: ddllcach.h
  7. //
  8. // Contents: Contains structure definitons for the significant dll class/
  9. // cache ole classes which the ntsd extensions need to access.
  10. // These ole classes cannot be accessed more cleanly because
  11. // typically the members of interest are protected.
  12. //
  13. // WARNING. IF THE REFERENCED OLE CLASSES CHANGE, THEN THESE
  14. // DEFINITIONS MUST CHANGE!
  15. //
  16. // History: 06-01-95 BruceMa Created
  17. //
  18. //--------------------------------------------------------------------------
  19. typedef HRESULT (*DLLUNLOADFNP)(void);
  20. const DWORD NONE = ~0UL;
  21. struct SClassEntry
  22. {
  23. DWORD _fAtBits; // Whether server is an at bits server
  24. DWORD _dwNext; // Next entry in in-use or avail list
  25. DWORD _dwSig; // Marks entry as in use
  26. CLSID _clsid; // Class of this server
  27. IUnknown *_pUnk; // Class factory IUnknown
  28. DWORD _dwContext; // Class context
  29. DWORD _dwFlags; // Single vs. multiple use
  30. DWORD _dwReg; // Registration key for caller
  31. DWORD _dwScmReg; // Registration ID at the SCM
  32. HAPT _hApt; // Thread Id
  33. DWORD _cCallOut; // Count of active call outs
  34. DWORD _fRevokePending;// Whether revoked while calling out
  35. DWORD _dwDllEnt; // Associated dll path entry
  36. DWORD _dwNextDllCls; // Next class entrry for this dll
  37. HWND _hWndDdeServer; // Handle of associated DDE window
  38. };
  39. struct SDllAptEntry
  40. {
  41. DWORD _dwNext; // Next entry in avail or in use list
  42. DWORD _dwSig; // Unique signature for apt entries
  43. HAPT _hApt; // apartment id
  44. HMODULE _hDll; // module handle
  45. };
  46. struct SDllPathEntry
  47. {
  48. DWORD _dwNext; // Next in-use/avail entry
  49. DWORD _dwSig; // Unique signature for safty
  50. LPWSTR _pwszPath; // The dll pathname
  51. DWORD _dwHash; // Hash value for searching
  52. LPFNGETCLASSOBJECT _pfnGetClassObject; // Create object entry point
  53. DLLUNLOADFNP _pfnDllCanUnload; // DllCanUnloadNow entry point
  54. DWORD _dwFlags; // Internal flags
  55. DWORD _dwDllThreadModel:2; // Threading model for the DLL
  56. DWORD _dw1stClass; // First class entry for dll
  57. DWORD _cUsing; // Count of using threads
  58. DWORD _cAptEntries; // Total apt entries
  59. DWORD _nAptAvail; // List of available apt entries
  60. DWORD _nAptInUse; // List of in use apt entries
  61. SDllAptEntry *_pAptEntries; // Per thread info
  62. };
  63. struct SDllCache
  64. {
  65. SMutexSem _mxsLoadLibrary; // Protects LoadLibrary calls
  66. SMutexSem _mxs; // Protects from multiple threads
  67. DWORD _cClassEntries; // Count of class entries
  68. DWORD _nClassEntryInUse; // First in-use class entry
  69. DWORD _nClassEntryAvail; // First available class entry
  70. SClassEntry *_pClassEntries; // Array of class entries
  71. DWORD _cDllPathEntries; // Count of dll path entries
  72. DWORD _nDllPathEntryInUse; // First in-use dll path entry
  73. DWORD _nDllPathEntryAvail; // First available dll path entry
  74. SDllPathEntry *_pDllPathEntries; // Array of DLL path entries
  75. };