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.

79 lines
1.7 KiB

  1. #ifndef _NDISPNPEVENT_H
  2. #define _NDISPNPEVENT_H
  3. #include <windows.h>
  4. #include <string>
  5. typedef std::basic_string<TCHAR> tstring;
  6. //
  7. // Definitions for Layer
  8. //
  9. #define NDIS 0x01
  10. #define TDI 0x02
  11. //
  12. // Definitions for Operation
  13. //
  14. #define BIND 0x01
  15. #define UNBIND 0x02
  16. #define RECONFIGURE 0x03
  17. #define UNBIND_FORCE 0x04
  18. #define UNLOAD 0x05
  19. #define REMOVE_DEVICE 0x06 // This is a notification that a device is about to be removed.
  20. #define ADD_IGNORE_BINDING 0x07
  21. #define DEL_IGNORE_BINDING 0x08
  22. const TCHAR c_szEmpty[] = TEXT("");
  23. const WCHAR c_szDevice[]= L"\\Device\\";
  24. #ifndef UNICODE_STRING
  25. typedef struct _UNICODE_STRING
  26. {
  27. USHORT Length;
  28. USHORT MaximumLength;
  29. PWSTR Buffer;
  30. } UNICODE_STRING, *PUNICODE_STRING;
  31. #endif
  32. void
  33. SetUnicodeString (
  34. OUT UNICODE_STRING* pustr,
  35. IN PCWSTR psz );
  36. void
  37. SetUnicodeMultiString (
  38. OUT UNICODE_STRING* pustr,
  39. IN PCWSTR pmsz );
  40. ULONG
  41. CchOfMultiSzSafe (
  42. IN PCWSTR pmsz);
  43. ULONG
  44. CchOfMultiSzAndTermSafe (
  45. IN PCWSTR pmsz);
  46. extern "C"
  47. {
  48. UINT __stdcall
  49. NdisHandlePnPEvent(
  50. IN UINT Layer,
  51. IN UINT Operation,
  52. IN PUNICODE_STRING LowerComponent OPTIONAL,
  53. IN PUNICODE_STRING UpperComponent OPTIONAL,
  54. IN PUNICODE_STRING BindList OPTIONAL,
  55. IN PVOID ReConfigBuffer OPTIONAL,
  56. IN UINT ReConfigBufferSize OPTIONAL
  57. );
  58. }
  59. HRESULT
  60. HrSendNdisPnpReconfig (
  61. UINT uiLayer,
  62. PCWSTR pszUpper,
  63. PCWSTR pszLower,
  64. PVOID pvData,
  65. DWORD dwSizeData);
  66. #endif