pnp.pas 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. {$IFNDEF FPC_DOTTEDUNITS}
  2. unit PnP;
  3. {$ENDIF FPC_DOTTEDUNITS}
  4. {$mode objfpc}
  5. (*
  6. (pnp.h)
  7. *)
  8. //
  9. // Copyright (c) Microsoft Corporation. All rights reserved.
  10. //
  11. //
  12. // Use of this source code is subject to the terms of the Microsoft end-user
  13. // license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
  14. // If you did not accept the terms of the EULA, you are not authorized to use
  15. // this source code. For a copy of the EULA, please see the LICENSE.RTF on your
  16. // install media.
  17. //
  18. // --------------------------------------------------------------------------
  19. interface
  20. {$IFDEF FPC_DOTTEDUNITS}
  21. uses
  22. WinApi.Windows;
  23. {$ELSE FPC_DOTTEDUNITS}
  24. uses
  25. Windows;
  26. {$ENDIF FPC_DOTTEDUNITS}
  27. const
  28. // Maximum size of a device interface name. The choice of value is arbitrary
  29. // but necessary for componenents that want to browse available interfaces
  30. // so that they can set up their message queues. This value does not include
  31. // the (required) terminating zero - that's already counted in DEVDETAIL.
  32. MAX_DEVCLASS_NAMELEN = 64;
  33. // Indicates an ordinary "stream" interface: open/read/write/iocontrol/close.
  34. // Devices that do not specify anything else and which expose a "ABCN:"
  35. // type of name automatically generate a notification with this GUID and
  36. // and a name equal to the device name (e.g., "FOO2:").
  37. DEVCLASS_STREAM_STRING = '{f8a6ba98-087a-43ac-a9d8-b7f13c5bae31}';
  38. DEVCLASS_STREAM_GUID: GUID = '{f8a6ba98-087a-43ac-a9d8-b7f13c5bae31}';
  39. type
  40. DEVDETAIL = record
  41. guidDevClass: GUID; // the device interface id for this notification
  42. dwReserved: DWORD; // do not use this
  43. fAttached: BOOL; // true if the di is present, false otherwise
  44. cbName: LongInt; // byte count of the interface's name
  45. szName: TCHAR; // beginning of the interface's name
  46. end;
  47. TDEVDETAIL = DEVDETAIL;
  48. PDEVDETAIL = ^DEVDETAIL;
  49. implementation
  50. end.