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.

178 lines
2.5 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Class: Common
  4. //
  5. // Purpose: Contains NWCOMPAT routines and properties that are common to
  6. // all NWCOMPAT objects. NWCOMPAT objects get the routines and
  7. // properties through C++ inheritance.
  8. //
  9. //-------------------------------------------------------------------------
  10. //
  11. // Accessing Well-known object types
  12. //
  13. typedef struct _filters {
  14. WCHAR szObjectName[MAX_PATH];
  15. DWORD dwFilterId;
  16. } FILTERS, *PFILTERS;
  17. extern PFILTERS gpFilters;
  18. extern DWORD gdwMaxFilters;
  19. #define MAX_DWORD 0xFFFFFFFF
  20. #define SCHEMA_NAME L"Schema"
  21. HRESULT
  22. MakeUncName(
  23. LPWSTR szSrcBuffer,
  24. LPWSTR szTargBuffer
  25. );
  26. HRESULT
  27. ValidateOutParameter(
  28. BSTR * retval
  29. );
  30. HRESULT
  31. BuildADsPath(
  32. BSTR Parent,
  33. BSTR Name,
  34. BSTR *pADsPath
  35. );
  36. HRESULT
  37. BuildSchemaPath(
  38. BSTR Parent,
  39. BSTR Name,
  40. BSTR Schema,
  41. BSTR *pSchemaPath
  42. );
  43. HRESULT
  44. BuildADsGuid(
  45. REFCLSID clsid,
  46. BSTR *pADsClass
  47. );
  48. HRESULT
  49. BuildObjectInfo(
  50. BSTR ADsParent,
  51. BSTR Name,
  52. POBJECTINFO * ppObjectInfo
  53. );
  54. HRESULT
  55. BuildObjectInfo(
  56. BSTR ADsPath,
  57. POBJECTINFO * ppObjectInfo
  58. );
  59. VOID
  60. FreeObjectInfo(
  61. POBJECTINFO pObjectInfo,
  62. BOOL fStatic = FALSE
  63. );
  64. HRESULT
  65. ValidateObject(
  66. DWORD dwObjectType,
  67. POBJECTINFO pObjectInfo
  68. );
  69. HRESULT
  70. GetObjectType(
  71. PFILTERS pFilters,
  72. DWORD dwMaxFilters,
  73. BSTR ClassName,
  74. PDWORD pdwObjectType
  75. );
  76. HRESULT
  77. ValidateProvider(
  78. POBJECTINFO pObjectInfo
  79. );
  80. HRESULT
  81. ConvertSystemTimeToDATE(
  82. SYSTEMTIME Time,
  83. DATE * pdaTime
  84. );
  85. HRESULT
  86. ConvertDATEToSYSTEMTIME(
  87. DATE daDate,
  88. SYSTEMTIME *pSysTime
  89. );
  90. HRESULT
  91. ConvertDATEToDWORD(
  92. DATE daDate,
  93. DWORD *pdwDate
  94. );
  95. HRESULT
  96. ConvertDWORDToDATE(
  97. DWORD dwTime,
  98. DATE * pdaTime
  99. );
  100. HRESULT
  101. DelimitedStringToVariant(
  102. LPTSTR pszString,
  103. VARIANT *pvar,
  104. TCHAR Delimiter
  105. );
  106. HRESULT
  107. VariantToDelimitedString(
  108. VARIANT var,
  109. LPTSTR *ppszString,
  110. TCHAR Delimiter
  111. );
  112. HRESULT
  113. VariantToNulledString(
  114. VARIANT var,
  115. LPTSTR *ppszString
  116. );
  117. HRESULT
  118. NulledStringToVariant(
  119. LPTSTR pszString,
  120. VARIANT *pvar
  121. );
  122. HRESULT
  123. BuildPrinterNameFromADsPath(
  124. LPWSTR pszADsParent,
  125. LPWSTR pszPrinterName,
  126. LPWSTR pszUncPrinterName
  127. );
  128. HRESULT
  129. ConvertNW312DateToVariant(
  130. BYTE byDateTime[],
  131. PDATE pDate
  132. );
  133. HRESULT
  134. ConvertVariantToNW312Date(
  135. DATE daDate,
  136. BYTE byDateTime[]
  137. );
  138.