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.

111 lines
2.4 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. // redefine extension id constant, extension entry struct
  17. // etc in different provider :( -> move all to one single
  18. // file in the router.
  19. //
  20. //
  21. // Most significant byte reserved for extension id.
  22. //
  23. #define MIN_EXTENSION_ID 1 // 0 reserved for aggregator
  24. #define MAX_EXTENSION_ID 127
  25. #define EXTRACT_EXTENSION_ID(dispid) ( ((dispid) & 0x7f000000 ) >> 24)
  26. #define REMOVE_EXTENSION_ID(dispid) ( (dispid) & 0x00ffffff )
  27. //
  28. // DO NOT !!! use this macro directly to prefix extension id to dispid.
  29. // Should call CheckAndPrefixExtID() or CheckAndPrefixExtIDArray() instead.
  30. //
  31. #define PREFIX_EXTENSION_ID(extID, dispid) \
  32. ( ((extID) << 24) | (dispid) )
  33. #if DBG == 1
  34. #define ASSERT_VALID_EXTENSION_ID(id) \
  35. ( (id)>=MIN_EXTENSION_ID && (id)<=MAX_EXTENSION_ID)
  36. #else
  37. #define ASSERT_VALID_EXTENSION_ID(id)
  38. #endif
  39. typedef struct _interface_entry{
  40. WCHAR szInterfaceIID[MAX_PATH];
  41. GUID iid;
  42. struct _interface_entry *pNext;
  43. }INTERFACE_ENTRY, *PINTERFACE_ENTRY;
  44. typedef struct _extension_entry {
  45. WCHAR szExtensionCLSID[MAX_PATH];
  46. GUID ExtCLSID;
  47. IPrivateUnknown * pUnknown;
  48. IPrivateDispatch * pPrivDisp;
  49. IADsExtension * pADsExt;
  50. BOOL fDisp;
  51. PINTERFACE_ENTRY pIID;
  52. DWORD dwExtensionID;
  53. struct _extension_entry * pNext;
  54. }EXTENSION_ENTRY, *PEXTENSION_ENTRY;
  55. typedef struct _class_entry {
  56. WCHAR szClassName[MAX_PATH];
  57. PEXTENSION_ENTRY pExtensionHead;
  58. struct _class_entry *pNext;
  59. }CLASS_ENTRY, *PCLASS_ENTRY;
  60. PCLASS_ENTRY
  61. BuildClassesList(
  62. );
  63. VOID
  64. FreeClassesList(
  65. PCLASS_ENTRY pClassHead
  66. );
  67. PCLASS_ENTRY
  68. BuildClassEntry(
  69. LPWSTR lpszClassName,
  70. HKEY hClassKey
  71. );
  72. PEXTENSION_ENTRY
  73. BuildExtensionEntry(
  74. LPWSTR lpszExtensionCLSID,
  75. HKEY hExtensionKey
  76. );
  77. HRESULT
  78. ADSIGetExtensionList(
  79. LPWSTR pszClassName,
  80. PCLASS_ENTRY * ppClassEntry
  81. );
  82. HRESULT
  83. ADSIAppendToExtensionList(
  84. LPWSTR pszClassName,
  85. PCLASS_ENTRY * ppClassEntry
  86. );