Home | History | Annotate | Download | only in include
      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 
     21 #include <winapifamily.h>
     22 
     23 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
     24 
     25 #ifndef _DEVPROPDEF_H_
     26 #define _DEVPROPDEF_H_
     27 
     28 typedef ULONG DEVPROPTYPE, *PDEVPROPTYPE;
     29 
     30 #define DEVPROP_TYPEMOD_ARRAY                   0x00001000
     31 #define DEVPROP_TYPEMOD_LIST                    0x00002000
     32 
     33 #define DEVPROP_TYPE_EMPTY                      0x00000000
     34 #define DEVPROP_TYPE_NULL                       0x00000001
     35 #define DEVPROP_TYPE_SBYTE                      0x00000002
     36 #define DEVPROP_TYPE_BYTE                       0x00000003
     37 #define DEVPROP_TYPE_INT16                      0x00000004
     38 #define DEVPROP_TYPE_UINT16                     0x00000005
     39 #define DEVPROP_TYPE_INT32                      0x00000006
     40 #define DEVPROP_TYPE_UINT32                     0x00000007
     41 #define DEVPROP_TYPE_INT64                      0x00000008
     42 #define DEVPROP_TYPE_UINT64                     0x00000009
     43 #define DEVPROP_TYPE_FLOAT                      0x0000000A
     44 #define DEVPROP_TYPE_DOUBLE                     0x0000000B
     45 #define DEVPROP_TYPE_DECIMAL                    0x0000000C
     46 #define DEVPROP_TYPE_GUID                       0x0000000D
     47 #define DEVPROP_TYPE_CURRENCY                   0x0000000E
     48 #define DEVPROP_TYPE_DATE                       0x0000000F
     49 #define DEVPROP_TYPE_FILETIME                   0x00000010
     50 #define DEVPROP_TYPE_BOOLEAN                    0x00000011
     51 #define DEVPROP_TYPE_STRING                     0x00000012
     52 #define DEVPROP_TYPE_STRING_LIST (DEVPROP_TYPE_STRING|DEVPROP_TYPEMOD_LIST)
     53 #define DEVPROP_TYPE_SECURITY_DESCRIPTOR        0x00000013
     54 #define DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING 0x00000014
     55 #define DEVPROP_TYPE_DEVPROPKEY                 0x00000015
     56 #define DEVPROP_TYPE_DEVPROPTYPE                0x00000016
     57 #define DEVPROP_TYPE_BINARY      (DEVPROP_TYPE_BYTE|DEVPROP_TYPEMOD_ARRAY)
     58 #define DEVPROP_TYPE_ERROR                      0x00000017
     59 #define DEVPROP_TYPE_NTSTATUS                   0x00000018
     60 #define DEVPROP_TYPE_STRING_INDIRECT            0x00000019
     61 
     62 #define MAX_DEVPROP_TYPE                        0x00000019
     63 #define MAX_DEVPROP_TYPEMOD                     0x00002000
     64 
     65 #define DEVPROP_MASK_TYPE                       0x00000FFF
     66 #define DEVPROP_MASK_TYPEMOD                    0x0000F000
     67 
     68 typedef CHAR DEVPROP_BOOLEAN, *PDEVPROP_BOOLEAN;
     69 
     70 #define DEVPROP_TRUE ((DEVPROP_BOOLEAN)-1)
     71 #define DEVPROP_FALSE ((DEVPROP_BOOLEAN) 0)
     72 
     73 #ifndef DEVPROPKEY_DEFINED
     74 #define DEVPROPKEY_DEFINED
     75 
     76 typedef GUID DEVPROPGUID, *PDEVPROPGUID;
     77 typedef ULONG DEVPROPID, *PDEVPROPID;
     78 
     79 typedef struct _DEVPROPKEY {
     80   DEVPROPGUID fmtid;
     81   DEVPROPID pid;
     82 } DEVPROPKEY, *PDEVPROPKEY;
     83 
     84 #endif /* DEVPROPKEY_DEFINED */
     85 
     86 #define DEVPROPID_FIRST_USABLE 2
     87 
     88 #endif /* _DEVPROPDEF_H_ */
     89 
     90 #ifdef DEFINE_DEVPROPKEY
     91 #undef DEFINE_DEVPROPKEY
     92 #endif
     93 #ifdef INITGUID
     94 #ifdef __cplusplus
     95 #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}
     96 #else
     97 #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}
     98 #endif
     99 #else
    100 #define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const DEVPROPKEY name
    101 #endif /* INITGUID */
    102 
    103 #ifndef IsEqualDevPropKey
    104 
    105 #ifdef __cplusplus
    106 #define IsEqualDevPropKey(a, b) (((a).pid == (b).pid) && IsEqualIID((a).fmtid, (b).fmtid))
    107 #else
    108 #define IsEqualDevPropKey(a, b) (((a).pid == (b).pid) && IsEqualIID(&(a).fmtid, &(b).fmtid))
    109 #endif
    110 
    111 #endif /* !IsEqualDevPropKey */
    112 
    113 #endif /* WINAPI_PARTION_DESKTOP.  */
    114