include winapifamily.inc

if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)

ifndef _DEVPROPDEF_H_
define _DEVPROPDEF_H_

DEVPROPTYPE		typedef ULONG
PDEVPROPTYPE		typedef ptr ULONG

DEVPROP_TYPEMOD_ARRAY	equ 0x00001000
DEVPROP_TYPEMOD_LIST	equ 0x00002000

DEVPROP_TYPE_EMPTY	equ 0x00000000
DEVPROP_TYPE_NULL	equ 0x00000001
DEVPROP_TYPE_SBYTE	equ 0x00000002
DEVPROP_TYPE_BYTE	equ 0x00000003
DEVPROP_TYPE_INT16	equ 0x00000004
DEVPROP_TYPE_UINT16	equ 0x00000005
DEVPROP_TYPE_INT32	equ 0x00000006
DEVPROP_TYPE_UINT32	equ 0x00000007
DEVPROP_TYPE_INT64	equ 0x00000008
DEVPROP_TYPE_UINT64	equ 0x00000009
DEVPROP_TYPE_FLOAT	equ 0x0000000A
DEVPROP_TYPE_DOUBLE	equ 0x0000000B
DEVPROP_TYPE_DECIMAL	equ 0x0000000C
DEVPROP_TYPE_GUID	equ 0x0000000D
DEVPROP_TYPE_CURRENCY	equ 0x0000000E
DEVPROP_TYPE_DATE	equ 0x0000000F
DEVPROP_TYPE_FILETIME	equ 0x00000010
DEVPROP_TYPE_BOOLEAN	equ 0x00000011
DEVPROP_TYPE_STRING	equ 0x00000012
DEVPROP_TYPE_STRING_LIST equ (DEVPROP_TYPE_STRING OR DEVPROP_TYPEMOD_LIST)
DEVPROP_TYPE_SECURITY_DESCRIPTOR equ 0x00000013
DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING equ 0x00000014
DEVPROP_TYPE_DEVPROPKEY equ 0x00000015
DEVPROP_TYPE_DEVPROPTYPE equ 0x00000016
DEVPROP_TYPE_BINARY	equ (DEVPROP_TYPE_BYTE OR DEVPROP_TYPEMOD_ARRAY)
DEVPROP_TYPE_ERROR	equ 0x00000017
DEVPROP_TYPE_NTSTATUS	equ 0x00000018
DEVPROP_TYPE_STRING_INDIRECT equ 0x00000019

MAX_DEVPROP_TYPE	equ 0x00000019
MAX_DEVPROP_TYPEMOD	equ 0x00002000

DEVPROP_MASK_TYPE	equ 0x00000FFF
DEVPROP_MASK_TYPEMOD	equ 0x0000F000

DEVPROP_BOOLEAN		typedef CHAR
PDEVPROP_BOOLEAN	typedef ptr CHAR

DEVPROP_TRUE		equ (-1)
DEVPROP_FALSE		equ (0)


ifndef DEVPROPKEY_DEFINED
define DEVPROPKEY_DEFINED

DEVPROPGUID		typedef GUID
DEVPROPID		typedef ULONG
PDEVPROPGUID		typedef ptr GUID
PDEVPROPID		typedef ptr ULONG

DEVPROPKEY		STRUC
fmtid			DEVPROPGUID <>
pid			DEVPROPID ?
DEVPROPKEY		ENDS
PDEVPROPKEY		typedef ptr DEVPROPKEY

endif

ifndef IsEqualDevPropKey
ifdef __cplusplus
IsEqualDevPropKey macro a, b
	exitm<(((a).pid EQ (b).pid) AND IsEqualGUID((a).fmtid, (b).fmtid))>
	endm
else
IsEqualDevPropKey macro a, b
	exitm<(((a).pid EQ (b).pid) AND IsEqualGUID( AND (a).fmtid, AND (b).fmtid))>
	endm
endif
endif

.enum DEVPROPSTORE { DEVPROP_STORE_SYSTEM, DEVPROP_STORE_USER }

PDEVPROPSTORE		typedef ptr DEVPROPSTORE

DEVPROPCOMPKEY		STRUC
Key			DEVPROPKEY <>
Store			DEVPROPSTORE ?
ifdef MIDL_PASS
LocaleName		LPWSTR ?
else
LocaleName		PCWSTR ?
endif
DEVPROPCOMPKEY		ENDS
PDEVPROPCOMPKEY		typedef ptr DEVPROPCOMPKEY

ifndef IsEqualLocaleName
IsEqualLocaleName macro a, b
	exitm<(((a) EQ (b)) OR (((a) NOT = NULL) AND ((b) NOT = NULL) AND (_wcsicmp((a), (b)) EQ 0)))>
	endm
endif

ifndef IsEqualDevPropCompKey
IsEqualDevPropCompKey macro a, b
	exitm<(IsEqualDevPropKey((a).Key, (b).Key) AND ((a).Store EQ (b).Store) AND IsEqualLocaleName((a).LocaleName, (b).LocaleName))>
	endm
endif

DEVPROPERTY		STRUC
CompKey			DEVPROPCOMPKEY <>
Type			DEVPROPTYPE ?
BufferSize		ULONG ?
ifdef MIDL_PASS
Buffer			LPBYTE ?
else
Buffer			PVOID ?
endif
DEVPROPERTY		ENDS
PDEVPROPERTY		typedef ptr DEVPROPERTY

DEVPROPID_FIRST_USABLE	equ 2

endif

ifndef DEFINE_DEVPROPKEY
DEFINE_DEVPROPKEY macro name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid
if defined(__PE__) or defined(__GUID__)
_&name& equ <{{l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}},pid}>
elseifdef INITGUID
echo name DEVPROPKEY {{l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}},pid}
else
externdef name:DEVPROPKEY
endif
    exitm<>
    endm
endif

endif
