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.

136 lines
2.4 KiB

  1. #pragma once
  2. #include "compdefs.h"
  3. #include "comp.h"
  4. BOOL
  5. FIsFilterDevice (HDEVINFO hdi, PSP_DEVINFO_DATA pdeid);
  6. BOOL
  7. FSubstringMatch (
  8. IN PCWSTR pStr1,
  9. IN PCWSTR pStr2,
  10. OUT const WCHAR** ppStart,
  11. OUT ULONG* pcch);
  12. PWSTR
  13. GetNextStringToken (
  14. IN OUT PWSTR pszString,
  15. IN PCWSTR pszDelims,
  16. OUT PWSTR* ppszNextToken);
  17. HRESULT
  18. HrOpenNetworkKey (
  19. IN REGSAM samDesired,
  20. OUT HKEY* phkey);
  21. HRESULT
  22. HrRegCreateKeyWithWorldAccess (
  23. HKEY hkey,
  24. PCWSTR pszSubkey,
  25. DWORD dwOptions,
  26. REGSAM samDesired,
  27. PHKEY phkey,
  28. LPDWORD pdwDisposition);
  29. LONG
  30. RegQueryValueType (
  31. IN HKEY hkey,
  32. IN PCWSTR pszValueName,
  33. IN DWORD dwType,
  34. OUT BYTE* pbData OPTIONAL,
  35. IN OUT DWORD* pcbData);
  36. LONG
  37. RegQueryGuid (
  38. IN HKEY hkey,
  39. IN PCWSTR pszValueName,
  40. OUT GUID* pguidData OPTIONAL,
  41. IN OUT DWORD* pcbData
  42. );
  43. VOID
  44. SignalNetworkProviderLoaded (
  45. VOID);
  46. VOID
  47. CreateInstanceKeyPath (
  48. NETCLASS Class,
  49. const GUID& InstanceGuid,
  50. PWSTR pszPath);
  51. VOID
  52. AddOrRemoveDontExposeLowerCharacteristicIfNeeded (
  53. IN OUT CComponent* pComponent);
  54. class CDynamicBuffer
  55. {
  56. private:
  57. PBYTE m_pbBuffer;
  58. ULONG m_cbConsumed;
  59. ULONG m_cbAllocated;
  60. ULONG m_cbGranularity;
  61. BOOL
  62. FGrowBuffer (
  63. ULONG cbGrow);
  64. public:
  65. CDynamicBuffer ()
  66. {
  67. ZeroMemory (this, sizeof(*this));
  68. }
  69. ~CDynamicBuffer ()
  70. {
  71. MemFree (m_pbBuffer);
  72. }
  73. VOID
  74. Clear ()
  75. {
  76. // Most of the time, the buffer is treated as a string. Setting
  77. // the buffer to an empty string is a convienence for callers who
  78. // clear the buffer then try to use it as a string. This way, they
  79. // don't have to check the CountOfBytesUsed before accessing the
  80. // buffer contents.
  81. //
  82. AssertH (m_pbBuffer);
  83. AssertH (m_cbAllocated > sizeof(WCHAR));
  84. *((PWCHAR)m_pbBuffer) = 0;
  85. m_cbConsumed = 0;
  86. }
  87. ULONG
  88. CountOfBytesUsed ()
  89. {
  90. return m_cbConsumed;
  91. }
  92. const BYTE*
  93. PbBuffer ()
  94. {
  95. AssertH (m_pbBuffer);
  96. return m_pbBuffer;
  97. }
  98. VOID
  99. SetGranularity (
  100. ULONG cbGranularity)
  101. {
  102. m_cbGranularity = cbGranularity;
  103. }
  104. HRESULT
  105. HrReserveBytes (
  106. ULONG cbReserve);
  107. HRESULT
  108. HrCopyBytes (
  109. const BYTE* pbSrc,
  110. ULONG cbSrc);
  111. HRESULT
  112. HrCopyString (
  113. PCWSTR pszSrc);
  114. };