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.

95 lines
2.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File:
  7. //
  8. // Contents:
  9. //
  10. // Functions:
  11. //
  12. // History:
  13. //
  14. //----------------------------------------------------------------------------
  15. //
  16. // Most significant byte reserved for extension id.
  17. //
  18. #define MIN_EXTENSION_ID 1 // 0 reserved for aggregator
  19. #define MAX_EXTENSION_ID 127
  20. #define EXTRACT_EXTENSION_ID(dispid) ( ((dispid) & 0x7f000000 ) >> 24)
  21. #define REMOVE_EXTENSION_ID(dispid) ( (dispid) & 0x00ffffff )
  22. //
  23. // DO NOT !!! use this macro directly to prefix extension id to dispid.
  24. // Should call CheckAndPrefixExtID() or CheckAndPrefixExtIDArray() instead.
  25. //
  26. #define PREFIX_EXTENSION_ID(extID, dispid) \
  27. ( ((extID) << 24) | (dispid) )
  28. #if DBG == 1
  29. #define ASSERT_VALID_EXTENSION_ID(id) \
  30. ( (id)>=MIN_EXTENSION_ID && (id)<=MAX_EXTENSION_ID)
  31. #else
  32. #define ASSERT_VALID_EXTENSION_ID(id)
  33. #endif
  34. typedef struct _interface_entry{
  35. WCHAR szInterfaceIID[MAX_PATH];
  36. GUID iid;
  37. struct _interface_entry *pNext;
  38. }INTERFACE_ENTRY, *PINTERFACE_ENTRY;
  39. typedef struct _extension_entry {
  40. WCHAR szExtensionCLSID[MAX_PATH];
  41. GUID ExtCLSID;
  42. IPrivateUnknown * pUnknown;
  43. IPrivateDispatch * pPrivDisp;
  44. IADsExtension * pADsExt;
  45. BOOL fDisp;
  46. PINTERFACE_ENTRY pIID;
  47. DWORD dwExtensionID;
  48. struct _extension_entry * pNext;
  49. }EXTENSION_ENTRY, *PEXTENSION_ENTRY;
  50. typedef struct _class_entry {
  51. WCHAR szClassName[MAX_PATH];
  52. PEXTENSION_ENTRY pExtensionHead;
  53. struct _class_entry *pNext;
  54. }CLASS_ENTRY, *PCLASS_ENTRY;
  55. PCLASS_ENTRY
  56. BuildClassesList(
  57. );
  58. VOID
  59. FreeClassesList(
  60. PCLASS_ENTRY pClassHead
  61. );
  62. PCLASS_ENTRY
  63. BuildClassEntry(
  64. LPWSTR lpszClassName,
  65. HKEY hClassKey
  66. );
  67. PEXTENSION_ENTRY
  68. BuildExtensionEntry(
  69. LPWSTR lpszExtensionCLSID,
  70. HKEY hExtensionKey
  71. );
  72. HRESULT
  73. ADSIGetExtensionList(
  74. LPWSTR pszClassName,
  75. PCLASS_ENTRY * ppClassEntry
  76. );