Fix PNP_QueryArbitratorFreeData() and PNP_QueryArbitratorFreeSize() prototypes.
[reactos.git] / reactos / include / reactos / idl / pnp.idl
index f9e706a..b776e6d 100644 (file)
@@ -14,12 +14,25 @@ const unsigned long PNP_MAX_PROP_SIZE = 65534;
 const unsigned long PNP_MAX_PROP_COUNT = 32767;
 const unsigned long PNP_MAX_BUFFER_SIZE = 16000000;
 
+cpp_quote("#ifndef _CFGMGR32_H_")
 typedef unsigned long RESOURCEID;
+
+typedef struct _HWPROFILEINFO {
+    DWORD HWPI_ulHWProfile;
+    WCHAR HWPI_szFriendlyName[80];
+    DWORD HWPI_dwFlags;
+} HWPROFILEINFO;
+
+cpp_quote("#endif")
 typedef unsigned long DEVPROPTYPE;
-typedef [range(0, PNP_MAX_PROP_SIZE)] unsigned long PNP_PROP_SIZE, *PPNP_PROP_SIZE;
-typedef [range(0, PNP_MAX_PROP_COUNT)] unsigned long PNP_PROP_COUNT, *PPNP_PROP_COUNT;
-typedef [range(0, PNP_MAX_STRING_LEN)] unsigned long PNP_RPC_STRING_LEN, *PPNP_RPC_STRING_LEN;
-typedef [range(0, PNP_MAX_BUFFER_SIZE)] unsigned long PNP_RPC_BUFFER_SIZE, *PPNP_RPC_BUFFER_SIZE;
+typedef [range(0, PNP_MAX_PROP_SIZE)] unsigned long PNP_PROP_SIZE;
+typedef [range(0, PNP_MAX_PROP_COUNT)] unsigned long PNP_PROP_COUNT;
+typedef [range(0, PNP_MAX_STRING_LEN)] unsigned long PNP_RPC_STRING_LEN;
+typedef [range(0, PNP_MAX_BUFFER_SIZE)] unsigned long PNP_RPC_BUFFER_SIZE;
+typedef PNP_PROP_SIZE *PPNP_PROP_SIZE;
+typedef PNP_PROP_COUNT *PPNP_PROP_COUNT;
+typedef PNP_RPC_STRING_LEN *PPNP_RPC_STRING_LEN;
+typedef PNP_RPC_BUFFER_SIZE *PPNP_RPC_BUFFER_SIZE;
 
 cpp_quote("#ifndef _CFG_INCLUDED_")
 
@@ -236,14 +249,8 @@ typedef struct _DEVPROPKEY {
     DWORD pid;
 } DEVPROPKEY;
 
-typedef struct _HWPROFILEINFO {
-    DWORD HWPI_ulHWProfile;
-    WCHAR HWPI_szFriendlyName[80];
-    DWORD HWPI_dwFlags;
-} HWPROFILEINFO;
-
 [
-  uuid (809F4e40-A03D-11CE-8F69-08003E30051B),
+  uuid (8D9F4E40-A03D-11CE-8F69-08003E30051B),
   version(1.0),
   pointer_default(unique)
   #ifndef __midl
@@ -284,7 +291,7 @@ interface pnp
     /* Function 6 */
     DWORD PNP_ValidateDeviceInstance(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulFlags);
 
     /* Function 7 */
@@ -300,7 +307,7 @@ interface pnp
     DWORD PNP_GetRelatedDeviceInstance(
         [in] handle_t hBinding,
         [in] DWORD ulRelationship,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [out, string, size_is(*pulLength)] LPWSTR pRelatedDeviceId,
         [in, out] PNP_RPC_STRING_LEN *pulLength,
         [in] DWORD ulFlags);
@@ -320,7 +327,7 @@ interface pnp
     /* Function 10 */
     DWORD PNP_GetDeviceList(
         [in] handle_t hBinding,
-        [in, string, unique, range(0, PNP_MAX_STRING_LEN)] LPWSTR pszFilter,
+        [in, string, unique] LPWSTR pszFilter,
         [out, size_is(*pulLength), length_is(*pulLength)] LPWSTR Buffer,
         [in, out] PNP_RPC_STRING_LEN *pulLength,
         [in] DWORD ulFlags);
@@ -328,21 +335,21 @@ interface pnp
     /* Function 11 */
     DWORD PNP_GetDeviceListSize(
         [in] handle_t hBinding,
-        [in, string, unique, range(0, PNP_MAX_STRING_LEN)] LPWSTR pszFilter,
+        [in, string, unique] LPWSTR pszFilter,
         [out] PNP_RPC_BUFFER_SIZE *pulLen,
         [in] DWORD ulFlags);
 
     /* Function 12 */
     DWORD PNP_GetDepth(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pszDeviceID,
+        [in, string, ref] LPWSTR pszDeviceID,
         [out] DWORD *pulDepth,
         [in] DWORD ulFlags);
 
     /* Function 13 */
     DWORD PNP_GetDeviceRegProp(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulProperty,
         [in, out] DWORD *pulRegDataType,
         [out, size_is(*pulTransferLen), length_is(*pulTransferLen)] BYTE *Buffer,
@@ -353,7 +360,7 @@ interface pnp
     /* Function 14 */
     DWORD PNP_SetDeviceRegProp(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceId,
+        [in, string, ref] LPWSTR pDeviceId,
         [in] DWORD ulProperty,
         [in] DWORD ulDataType,
         [in, size_is(ulLength)] BYTE *Buffer,
@@ -363,23 +370,23 @@ interface pnp
     /* Function 15 */
     DWORD PNP_GetClassInstance(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceId,
+        [in, string, ref] LPWSTR pDeviceId,
         [out, string, size_is(ulLength)] LPWSTR pszClassInstance,
         [in] PNP_RPC_STRING_LEN ulLength);
 
     /* Function 16 */
     DWORD PNP_CreateKey(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_CM_PATH)] LPWSTR pszSubKey,
+        [in, string, ref] LPWSTR pszSubKey,
         [in] DWORD samDesired,
         [in] DWORD ulFlags);
 
     /* Function 17 */
     DWORD PNP_DeleteRegistryKey(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pszDeviceID,
-        [in, string, ref, range(0, PNP_MAX_CM_PATH)] LPWSTR pszParentKey,
-        [in, string, ref, range(0, PNP_MAX_CM_PATH)] LPWSTR pszChildKey,
+        [in, string, ref] LPWSTR pszDeviceID,
+        [in, string, ref] LPWSTR pszParentKey,
+        [in, string, ref] LPWSTR pszChildKey,
         [in] DWORD ulFlags);
 
     /* Function 18 */
@@ -391,7 +398,7 @@ interface pnp
     /* Function 19 */
     DWORD PNP_GetClassName(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_GUID_STRING_LEN)] LPWSTR pszClassGuid,
+        [in, string, ref] LPWSTR pszClassGuid,
         [out, string, size_is(*pulLength)] LPWSTR Buffer,
         [in, out] PNP_RPC_STRING_LEN *pulLength,
         [in] DWORD ulFlags);
@@ -399,13 +406,13 @@ interface pnp
     /* Function 20 */
     DWORD PNP_DeleteClassKey(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_GUID_STRING_LEN)] LPWSTR pszClassGuid,
+        [in, string, ref] LPWSTR pszClassGuid,
         [in] DWORD ulFlags);
 
     /* Function 21 */
     DWORD PNP_GetInterfaceDeviceAlias(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVINTERFACE_LEN)] LPWSTR pszInterfaceDevice,
+        [in, string, ref] LPWSTR pszInterfaceDevice,
         [in] GUID *AliasInterfaceGuid,
         [out, string, size_is(*pulTransferLen)] LPWSTR pszAliasInterfaceDevice,
         [in, out] PNP_RPC_STRING_LEN *pulLength,
@@ -416,7 +423,7 @@ interface pnp
     DWORD PNP_GetInterfaceDeviceList(
         [in] handle_t hBinding,
         [in] GUID *InterfaceGuid,
-        [in, string, unique, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pszDeviceID,
+        [in, string, unique] LPWSTR pszDeviceID,
         [out, size_is(*pulLength), length_is(*pulLength)] BYTE *Buffer,
         [in, out] PNP_RPC_BUFFER_SIZE *pulLength,
         [in] DWORD ulFlags);
@@ -426,15 +433,15 @@ interface pnp
         [in] handle_t hBinding,
         [out] PNP_RPC_BUFFER_SIZE *pulLen,
         [in] GUID *InterfaceGuid,
-        [in, string, unique, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pszDeviceID,
+        [in, string, unique] LPWSTR pszDeviceID,
         [in] DWORD ulFlags);
 
     /* Function 24 */
     DWORD PNP_RegisterDeviceClassAssociation(
         [in] handle_t hBinding,
-        [in, string, unique, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pszDeviceID,
+        [in, string, unique] LPWSTR pszDeviceID,
         [in] GUID *InterfaceGuid,
-        [in, string, unique, range(0, PNP_MAX_STRING_LEN)] LPWSTR pszReference,
+        [in, string, unique] LPWSTR pszReference,
         [out, string, size_is(*pulTransferLen)] LPWSTR pszSymLink,
         [in, out] PNP_RPC_STRING_LEN *pulLength,
         [in, out] PNP_RPC_STRING_LEN *pulTransferLen,
@@ -443,13 +450,13 @@ interface pnp
     /* Function 25 */
     DWORD PNP_UnregisterDeviceClassAssociation(
         [in] handle_t hBinding,
-        [in, string, unique, range(0, PNP_MAX_DEVINTERFACE_LEN)] LPWSTR pszInterfaceDevice,
+        [in, string, unique] LPWSTR pszInterfaceDevice,
         [in] DWORD ulFlags);
 
     /* Function 26 */
     DWORD PNP_GetClassRegProp(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_GUID_STRING_LEN)] LPWSTR pszClassGuid,
+        [in, string, ref] LPWSTR pszClassGuid,
         [in] DWORD ulProperty,
         [in, out] DWORD *pulRegDataType,
         [out, size_is(*pulTransferLen), length_is(*pulTransferLen)] BYTE *Buffer,
@@ -460,7 +467,7 @@ interface pnp
     /* Function 27 */
     DWORD PNP_SetClassRegProp(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_GUID_STRING_LEN)] LPWSTR *pszClassGuid,
+        [in, string, ref] LPWSTR *pszClassGuid,
         [in] DWORD ulProperty,
         [in] DWORD ulDataType,
         [in, size_is(ulLength)] BYTE *Buffer,
@@ -471,22 +478,27 @@ interface pnp
     DWORD PNP_CreateDevInst(
         [in] handle_t hBinding,
         [in, out, string, size_is(ulLength)] LPWSTR pszDeviceID,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pszParentDeviceID,
+        [in, string, ref] LPWSTR pszParentDeviceID,
         [in] PNP_RPC_STRING_LEN ulLength,
         [in] DWORD ulFlags);
 
     /* Function 29 */
+    cpp_quote("#define PNP_DEVINST_MOVE        0x2")
+    cpp_quote("#define PNP_DEVINST_SETUP       0x3")
+    cpp_quote("#define PNP_DEVINST_ENABLE      0x4")
+    cpp_quote("#define PNP_DEVINST_DISABLE     0x5")
+    cpp_quote("#define PNP_DEVINST_REENUMERATE 0x7")
     DWORD PNP_DeviceInstanceAction(
         [in] handle_t hBinding,
-        [in] DWORD ulMajorAction,
-        [in] DWORD ulMinorAction,
-        [in, string, unique, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pszDeviceInstance1,
-        [in, string, unique, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pszDeviceInstance2);
+        [in] DWORD ulAction,
+        [in] DWORD ulFlags,
+        [in, string, unique] LPWSTR pszDeviceInstance1,
+        [in, string, unique] LPWSTR pszDeviceInstance2);
 
     /* Function 30 */
     DWORD PNP_GetDeviceStatus(
         [in] handle_t hBinding,
-        [in, string, unique, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, unique] LPWSTR pDeviceID,
         [out] DWORD *pulStatus,
         [out] DWORD *pulProblem,
         [in] DWORD ulFlags);
@@ -494,56 +506,53 @@ interface pnp
     /* Function 31 */
     DWORD PNP_SetDeviceProblem(
         [in] handle_t hBinding,
-        [in, string, unique, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, unique] LPWSTR pDeviceID,
         [in] DWORD ulProblem,
         [in] DWORD ulFlags);
 
     /* Function 32 */
     DWORD PNP_DisableDevInst(
         [in] handle_t hBinding,
-        [in, string, unique, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, unique] LPWSTR pDeviceID,
         [in, out, unique] PPNP_VETO_TYPE pVetoType,
-        [in, out, string, unique, size_is(ulNameLength), range(0, PNP_MAX_STRING_LEN)] LPWSTR pszVetoName,
-        /* FIXME: should be [in, out, string, unique, max_is(ulNameLength), range(0, PNP_MAX_STRING_LEN)] LPWSTR pszVetoName, */
+        [in, out, string, unique, size_is(ulNameLength)] LPWSTR pszVetoName,
         [in] DWORD ulNameLength,
         [in] DWORD ulFlags);
 
     /* Function 33 */
     DWORD PNP_UninstallDevInst(
         [in] handle_t hBinding,
-        [in, string, unique, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, unique] LPWSTR pDeviceID,
         [in] DWORD ulFlags);
 
     /* Function 34 */
     DWORD PNP_AddID(
         [in] handle_t hBinding,
-        [in, string, unique, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pszDeviceID,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pszID,
+        [in, string, unique] LPWSTR pszDeviceID,
+        [in, string, ref] LPWSTR pszID,
         [in] DWORD ulFlags);
 
     /* Function 35 */
     DWORD PNP_RegisterDriver(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pszDeviceID,
+        [in, string, ref] LPWSTR pszDeviceID,
         [in] DWORD ulFlags);
 
     /* Function 36 */
     DWORD PNP_QueryRemove(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pszDeviceID,
+        [in, string, ref] LPWSTR pszDeviceID,
         [in, out, unique] PPNP_VETO_TYPE pVetoType,
-        [in, out, string, unique, size_is(ulNameLength), range(0, PNP_MAX_STRING_LEN)] LPWSTR pszVetoName,
-        /* FIXME: should be [in, out, string, unique, max_is(ulNameLength), range(0, PNP_MAX_STRING_LEN)] LPWSTR pszVetoName, */
+        [in, out, string, unique, size_is(ulNameLength)] LPWSTR pszVetoName,
         [in] DWORD ulNameLength,
         [in] DWORD ulFlags);
 
     /* Function 37 */
     DWORD PNP_RequestDeviceEject(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pszDeviceID,
+        [in, string, ref] LPWSTR pszDeviceID,
         [in, out, unique] PPNP_VETO_TYPE pVetoType,
-        [in, out, string, unique, size_is(ulNameLength), range(0, PNP_MAX_STRING_LEN)] LPWSTR pszVetoName,
-        /* FIXME: should be [in, out, string, unique, max_is(ulNameLength), range(0, PNP_MAX_STRING_LEN)] LPWSTR pszVetoName, */
+        [in, out, string, unique, size_is(ulNameLength)] LPWSTR pszVetoName,
         [in] DWORD ulNameLength,
         [in] DWORD ulFlags);
 
@@ -562,12 +571,11 @@ interface pnp
     DWORD PNP_HwProfFlags(
         [in] handle_t hBinding,
         [in] DWORD ulAction,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulConfig,
         [in, out] DWORD *pulValue,
         [in, out, unique] PPNP_VETO_TYPE pVetoType,
-        [in, out, string, unique, size_is(ulNameLength), range(0, PNP_MAX_STRING_LEN)] LPWSTR pszVetoName,
-        /* FIXME: should be [in, out, string, unique, max_is(ulNameLength), range(0, PNP_MAX_STRING_LEN)] LPWSTR pszVetoName, */
+        [in, out, string, unique, size_is(ulNameLength)] LPWSTR pszVetoName,
         [in] DWORD ulNameLength,
         [in] DWORD ulFlags);
 
@@ -583,7 +591,7 @@ interface pnp
     /* Function 42 */
     DWORD PNP_AddEmptyLogConf(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulPriority,
         [out] DWORD *pulLogConfTag,
         [in] DWORD ulFlags);
@@ -591,7 +599,7 @@ interface pnp
     /* Function 43 */
     DWORD PNP_FreeLogConf(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulLogConfType,
         [in] DWORD ulLogConfTag,
         [in] DWORD ulFlags);
@@ -599,7 +607,7 @@ interface pnp
     /* Function 44 */
     DWORD PNP_GetFirstLogConf(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulLogConfType,
         [out] DWORD *pulLogConfTag,
         [in] DWORD ulFlags);
@@ -607,7 +615,7 @@ interface pnp
     /* Function 45 */
     DWORD PNP_GetNextLogConf(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulLogConfType,
         [in] DWORD ulCurrentTag,
         [out] DWORD *pulNextTag,
@@ -616,7 +624,7 @@ interface pnp
     /* Function 46 */
     DWORD PNP_GetLogConfPriority(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulType,
         [in] DWORD ulTag,
         [out] DWORD *pPriority,
@@ -625,7 +633,7 @@ interface pnp
     /* Function 47 */
     DWORD PNP_AddResDes(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulLogConfTag,
         [in] DWORD ulLogConfType,
         [in] RESOURCEID ResourceID,
@@ -637,7 +645,7 @@ interface pnp
     /* Function 48 */
     DWORD PNP_FreeResDes(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulLogConfTag,
         [in] DWORD ulLogConfType,
         [in] RESOURCEID ResourceID,
@@ -649,7 +657,7 @@ interface pnp
     /* Function 49 */
     DWORD PNP_GetNextResDes(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulLogConfTag,
         [in] DWORD ulLogConfType,
         [in] RESOURCEID ResourceID,
@@ -661,7 +669,7 @@ interface pnp
     /* Function 50 */
     DWORD PNP_GetResDesData(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulLogConfTag,
         [in] DWORD ulLogConfType,
         [in] RESOURCEID ResourceID,
@@ -673,7 +681,7 @@ interface pnp
     /* Function 51 */
     DWORD PNP_GetResDesDataSize(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulLogConfTag,
         [in] DWORD ulLogConfType,
         [in] RESOURCEID ResourceID,
@@ -684,7 +692,7 @@ interface pnp
     /* Function 52 */
     DWORD PNP_ModifyResDes(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] DWORD ulLogConfTag,
         [in] DWORD ulLogConfType,
         [in] RESOURCEID CurrentResourceID,
@@ -697,7 +705,7 @@ interface pnp
     /* Function 53 */
     DWORD PNP_DetectResourceConflict(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] RESOURCEID ResourceID,
         [in, size_is(ResourceLen)] BYTE *ResourceData,
         [in] PNP_RPC_BUFFER_SIZE ResourceLen,
@@ -707,7 +715,7 @@ interface pnp
     /* Function 54 */
     DWORD PNP_QueryResConfList(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR pDeviceID,
         [in] RESOURCEID ResourceID,
         [in, size_is(ResourceLen)] BYTE *ResourceData,
         [in] PNP_RPC_BUFFER_SIZE ResourceLen,
@@ -717,15 +725,26 @@ interface pnp
 
     /* Function 55 */
     DWORD PNP_SetHwProf(
-        [in] handle_t hBinding);
+        [in] handle_t hBinding,
+        [in] DWORD ulHardwareProfile,
+        [in] DWORD ulFlags);
 
     /* Function 56 */
     DWORD PNP_QueryArbitratorFreeData(
-        [in] handle_t hBinding);
+        [in] handle_t hBinding,
+        [out,size_is(DataLen)] BYTE *pData,
+        [in] DWORD DataLen,
+        [in, string, ref] LPWSTR pDeviceID,
+        [in] RESOURCEID ResourceID,
+        [in] DWORD ulFlags);
 
     /* Function 57 */
     DWORD PNP_QueryArbitratorFreeSize(
-        [in] handle_t hBinding);
+        [in] handle_t hBinding,
+        [out] DWORD *pulSize,
+        [in, string, ref] LPWSTR pDeviceID,
+        [in] RESOURCEID ResourceID,
+        [in] DWORD ulFlags);
 
     /* Function 58 */
     DWORD PNP_RunDetection(
@@ -745,8 +764,8 @@ cpp_quote("#if _WIN32_WINNT >= 0x0501")
     /* Function 61 */
     DWORD PNP_GetCustomDevProp(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_DEVICE_ID_LEN)] LPWSTR pDeviceID,
-        [in, string, ref, range(0, PNP_MAX_STRING_LEN)] LPWSTR CustomPropName,
+        [in, string, ref] LPWSTR pDeviceID,
+        [in, string, ref] LPWSTR CustomPropName,
         [out] DWORD *pulRegDataType,
         [out, size_is(*pulLength), length_is(*pulTransferLen)] BYTE *Buffer,
         [out] PNP_RPC_STRING_LEN *pulTransferLen,
@@ -777,9 +796,9 @@ cpp_quote("#if _WIN32_WINNT >= 0x0600")
     /* Function 65 */
     DWORD PNP_GetObjectPropKeys(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_STRING_LEN)] LPWSTR ObjectName,
+        [in, string, ref] LPWSTR ObjectName,
         [in] DWORD ObjectType,
-        [in, string, unique, range(0, PNP_MAX_CULTURE_NAME_LEN)] LPWSTR PropertyCultureName,
+        [in, string, unique] LPWSTR PropertyCultureName,
         [in, out] PNP_PROP_COUNT *PropertyCount,
         [out] PNP_PROP_COUNT *TransferLen,
         [out, size_is(*PropertyCount), length_is(*TransferLen)] DEVPROPKEY *PropertyKeys,
@@ -788,9 +807,9 @@ cpp_quote("#if _WIN32_WINNT >= 0x0600")
     /* Function 66 */
     DWORD PNP_GetObjectProp(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_STRING_LEN)] LPWSTR ObjectName,
+        [in, string, ref] LPWSTR ObjectName,
         [in] DWORD ObjectType,
-        [in, string, unique, range(0, PNP_MAX_CULTURE_NAME_LEN)] LPWSTR PropertyCultureName,
+        [in, string, unique] LPWSTR PropertyCultureName,
         [in] const DEVPROPKEY *PropertyKey,
         [out] DEVPROPTYPE *PropertyType,
         [in, out] PNP_PROP_SIZE *PropertySize,
@@ -801,9 +820,9 @@ cpp_quote("#if _WIN32_WINNT >= 0x0600")
     /* Function 67 */
     DWORD PNP_SetObjectProp(
         [in] handle_t hBinding,
-        [in, string, ref, range(0, PNP_MAX_STRING_LEN)] LPWSTR ObjectName,
+        [in, string, ref] LPWSTR ObjectName,
         [in] DWORD ObjectType,
-        [in, string, unique, range(0, PNP_MAX_CULTURE_NAME_LEN)] LPWSTR PropertyCultureName,
+        [in, string, unique] LPWSTR PropertyCultureName,
         [in] const DEVPROPKEY *PropertyKey,
         [in] DEVPROPTYPE PropertyType,
         [in] PNP_PROP_SIZE PropertySize,