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.

98 lines
2.3 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992-2001.
  5. //
  6. // File: C O M M O N. H
  7. //
  8. // Contents: Common macros and declarations for the sample notify object.
  9. //
  10. // Notes:
  11. //
  12. // Author: Alok Sinha
  13. //
  14. //----------------------------------------------------------------------------
  15. #ifndef COMMON_H_INCLUDED
  16. #define COMMON_H_INCLUDED
  17. #include <devguid.h>
  18. enum ConfigAction {
  19. eActUnknown,
  20. eActInstall,
  21. eActAdd,
  22. eActRemove,
  23. eActUpdate,
  24. eActPropertyUIAdd,
  25. eActPropertyUIRemove
  26. };
  27. //
  28. // PnP ID, also referred to as Hardware ID, of the protocol interface.
  29. //
  30. const WCHAR c_szMuxProtocol[] = L"ms_muxp";
  31. //
  32. // PnP ID, also referred to as Hardware ID, of the Miniport interface.
  33. //
  34. const WCHAR c_szMuxMiniport[] = L"ms_muxmp";
  35. //
  36. // Name of the service as specified in the inf file in AddService directive.
  37. //
  38. const WCHAR c_szMuxService[] = L"muxp";
  39. //
  40. // Path to the config string where the virtual miniport instance names
  41. // are stored.
  42. //
  43. const WCHAR c_szAdapterList[] =
  44. L"System\\CurrentControlSet\\Services\\muxp\\Parameters\\Adapters";
  45. //
  46. // Value name in the registry where miniport device id is stored.
  47. //
  48. const WCHAR c_szUpperBindings[] = L"UpperBindings";
  49. const WCHAR c_szDevicePrefix[] = L"\\Device\\";
  50. #define ReleaseObj( x ) if ( x ) \
  51. ((IUnknown*)(x))->Release();
  52. #if DBG
  53. void TraceMsg (LPWSTR szFormat, ...);
  54. void DumpChangeFlag (DWORD dwChangeFlag);
  55. void DumpBindingPath (INetCfgBindingPath* pncbp);
  56. void DumpComponent (INetCfgComponent *pncc);
  57. #else
  58. #define TraceMsg
  59. #define DumpChangeFlag( x )
  60. #define DumpBindingPath( x )
  61. #define DumpComponent( x )
  62. #endif
  63. HRESULT HrFindInstance (INetCfg *pnc,
  64. GUID &guidInstance,
  65. INetCfgComponent **ppnccMiniport);
  66. LONG AddToMultiSzValue( HKEY hkeyAdapterGuid,
  67. LPWSTR szMiniportGuid);
  68. LONG DeleteFromMultiSzValue( HKEY hkeyAdapterGuid,
  69. LPWSTR szMiniportGuid);
  70. LPWSTR AddDevicePrefix (LPWSTR lpStr);
  71. LPWSTR RemoveDevicePrefix (LPWSTR lpStr);
  72. #endif // COMMON_H_INCLUDED