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.

195 lines
2.7 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. CCredentials &Credentials
  69. );
  70. HRESULT
  71. GetObjectType(
  72. PFILTERS pFilters,
  73. DWORD dwMaxFilters,
  74. BSTR ClassName,
  75. PDWORD pdwObjectType
  76. );
  77. HRESULT
  78. ValidateProvider(
  79. POBJECTINFO pObjectInfo
  80. );
  81. HRESULT
  82. ConvertSystemTimeToDATE(
  83. SYSTEMTIME Time,
  84. DATE * pdaTime
  85. );
  86. HRESULT
  87. ConvertDATEToSYSTEMTIME(
  88. DATE daDate,
  89. SYSTEMTIME *pSysTime
  90. );
  91. HRESULT
  92. ConvertDATEToDWORD(
  93. DATE daDate,
  94. DWORD *pdwDate
  95. );
  96. HRESULT
  97. ConvertDWORDToDATE(
  98. DWORD dwTime,
  99. DATE * pdaTime
  100. );
  101. HRESULT
  102. DelimitedStringToVariant(
  103. LPTSTR pszString,
  104. VARIANT *pvar,
  105. TCHAR Delimiter
  106. );
  107. HRESULT
  108. VariantToDelimitedString(
  109. VARIANT var,
  110. LPTSTR *ppszString,
  111. TCHAR Delimiter
  112. );
  113. HRESULT
  114. VariantToNulledString(
  115. VARIANT var,
  116. LPTSTR *ppszString
  117. );
  118. HRESULT
  119. NulledStringToVariant(
  120. LPTSTR pszString,
  121. VARIANT *pvar
  122. );
  123. HRESULT
  124. BuildPrinterNameFromADsPath(
  125. LPWSTR pszADsParent,
  126. LPWSTR pszPrinterName,
  127. LPWSTR pszUncPrinterName
  128. );
  129. HRESULT
  130. ConvertNW312DateToVariant(
  131. BYTE byDateTime[],
  132. PDATE pDate
  133. );
  134. HRESULT
  135. ConvertVariantToNW312Date(
  136. DATE daDate,
  137. BYTE byDateTime[]
  138. );
  139. HRESULT
  140. ConvertNW312DateToSYSTEMTIME(
  141. BYTE byDateTime[],
  142. SYSTEMTIME *pSysTime
  143. );
  144. HRESULT
  145. CheckAndSetExtendedError(
  146. DWORD dwRetval
  147. );
  148. HRESULT
  149. InitializeNWLibrary(
  150. void
  151. );
  152.