devpropdef.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. * devpropdef.h
  3. *
  4. * This file is part of the ReactOS PSDK package.
  5. *
  6. * Contributors:
  7. * Created by Amine Khaldi.
  8. *
  9. * THIS SOFTWARE IS NOT COPYRIGHTED
  10. *
  11. * This source code is offered for use in the public domain. You may
  12. * use, modify or distribute it freely.
  13. *
  14. * This code is distributed in the hope that it will be useful but
  15. * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
  16. * DISCLAIMED. This includes but is not limited to warranties of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  18. *
  19. */
  20. #include <winapifamily.h>
  21. #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
  22. #ifndef _DEVPROPDEF_H_
  23. #define _DEVPROPDEF_H_
  24. typedef ULONG DEVPROPTYPE, *PDEVPROPTYPE;
  25. #define DEVPROP_TYPEMOD_ARRAY 0x00001000
  26. #define DEVPROP_TYPEMOD_LIST 0x00002000
  27. #define DEVPROP_TYPE_EMPTY 0x00000000
  28. #define DEVPROP_TYPE_NULL 0x00000001
  29. #define DEVPROP_TYPE_SBYTE 0x00000002
  30. #define DEVPROP_TYPE_BYTE 0x00000003
  31. #define DEVPROP_TYPE_INT16 0x00000004
  32. #define DEVPROP_TYPE_UINT16 0x00000005
  33. #define DEVPROP_TYPE_INT32 0x00000006
  34. #define DEVPROP_TYPE_UINT32 0x00000007
  35. #define DEVPROP_TYPE_INT64 0x00000008
  36. #define DEVPROP_TYPE_UINT64 0x00000009
  37. #define DEVPROP_TYPE_FLOAT 0x0000000A
  38. #define DEVPROP_TYPE_DOUBLE 0x0000000B
  39. #define DEVPROP_TYPE_DECIMAL 0x0000000C
  40. #define DEVPROP_TYPE_GUID 0x0000000D
  41. #define DEVPROP_TYPE_CURRENCY 0x0000000E
  42. #define DEVPROP_TYPE_DATE 0x0000000F
  43. #define DEVPROP_TYPE_FILETIME 0x00000010
  44. #define DEVPROP_TYPE_BOOLEAN 0x00000011
  45. #define DEVPROP_TYPE_STRING 0x00000012
  46. #define DEVPROP_TYPE_STRING_LIST (DEVPROP_TYPE_STRING|DEVPROP_TYPEMOD_LIST)
  47. #define DEVPROP_TYPE_SECURITY_DESCRIPTOR 0x00000013
  48. #define DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING 0x00000014
  49. #define DEVPROP_TYPE_DEVPROPKEY 0x00000015
  50. #define DEVPROP_TYPE_DEVPROPTYPE 0x00000016
  51. #define DEVPROP_TYPE_BINARY (DEVPROP_TYPE_BYTE|DEVPROP_TYPEMOD_ARRAY)
  52. #define DEVPROP_TYPE_ERROR 0x00000017
  53. #define DEVPROP_TYPE_NTSTATUS 0x00000018
  54. #define DEVPROP_TYPE_STRING_INDIRECT 0x00000019
  55. #define MAX_DEVPROP_TYPE 0x00000019
  56. #define MAX_DEVPROP_TYPEMOD 0x00002000
  57. #define DEVPROP_MASK_TYPE 0x00000FFF
  58. #define DEVPROP_MASK_TYPEMOD 0x0000F000
  59. typedef CHAR DEVPROP_BOOLEAN, *PDEVPROP_BOOLEAN;
  60. #define DEVPROP_TRUE ((DEVPROP_BOOLEAN)-1)
  61. #define DEVPROP_FALSE ((DEVPROP_BOOLEAN) 0)
  62. #ifndef DEVPROPKEY_DEFINED
  63. #define DEVPROPKEY_DEFINED
  64. typedef GUID DEVPROPGUID, *PDEVPROPGUID;
  65. typedef ULONG DEVPROPID, *PDEVPROPID;
  66. typedef struct _DEVPROPKEY {
  67. DEVPROPGUID fmtid;
  68. DEVPROPID pid;
  69. } DEVPROPKEY, *PDEVPROPKEY;
  70. #endif /* DEVPROPKEY_DEFINED */
  71. #define DEVPROPID_FIRST_USABLE 2
  72. #endif /* _DEVPROPDEF_H_ */
  73. #ifdef DEFINE_DEVPROPKEY
  74. #undef DEFINE_DEVPROPKEY
  75. #endif
  76. #ifdef INITGUID
  77. #ifdef __cplusplus
  78. #define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const DEVPROPKEY DECLSPEC_SELECTANY name = {{ l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}, pid}
  79. #else
  80. #define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) const DEVPROPKEY DECLSPEC_SELECTANY name = {{ l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}, pid}
  81. #endif
  82. #else
  83. #define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const DEVPROPKEY name
  84. #endif /* INITGUID */
  85. #ifndef IsEqualDevPropKey
  86. #ifdef __cplusplus
  87. #define IsEqualDevPropKey(a, b) (((a).pid == (b).pid) && IsEqualIID((a).fmtid, (b).fmtid))
  88. #else
  89. #define IsEqualDevPropKey(a, b) (((a).pid == (b).pid) && IsEqualIID(&(a).fmtid, &(b).fmtid))
  90. #endif
  91. #endif /* !IsEqualDevPropKey */
  92. #endif /* WINAPI_PARTION_DESKTOP. */