Author: ekohl
Date: Sun Jun 25 02:57:53 2006
New Revision: 22600
URL:
http://svn.reactos.org/svn/reactos?rev=22600&view=rev
Log:
Implement CM_Set_HW_Prof_Flags[_Ex]A/W.
Modified:
trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def
trunk/reactos/dll/win32/setupapi/cfgmgr.c
trunk/reactos/dll/win32/setupapi/setupapi.spec
trunk/reactos/include/ddk/cfgmgr32.h
trunk/reactos/include/reactos/wine/cfgmgr32.h
Modified: trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cfgmgr32/cfgmgr3…
==============================================================================
--- trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def (original)
+++ trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def Sun Jun 25 02:57:53 2006
@@ -195,10 +195,10 @@
CM_Set_DevNode_Registry_Property_ExW(a)24=SETUPAPI.CM_Set_DevNode_Registry_Property_ExW
;CM_Set_HW_Prof
;CM_Set_HW_Prof_Ex
-;CM_Set_HW_Prof_FlagsA
-;CM_Set_HW_Prof_FlagsW
-;CM_Set_HW_Prof_Flags_ExA
-;CM_Set_HW_Prof_Flags_ExW
+CM_Set_HW_Prof_FlagsA(a)16=SETUPAPI.CM_Set_HW_Prof_FlagsA
+CM_Set_HW_Prof_FlagsW(a)16=SETUPAPI.CM_Set_HW_Prof_FlagsW
+CM_Set_HW_Prof_Flags_ExA(a)20=SETUPAPI.CM_Set_HW_Prof_Flags_ExA
+CM_Set_HW_Prof_Flags_ExW(a)20=SETUPAPI.CM_Set_HW_Prof_Flags_ExW
CM_Setup_DevNode(a)8=SETUPAPI.CM_Setup_DevNode
CM_Setup_DevNode_Ex(a)12=SETUPAPI.CM_Setup_DevNode_Ex
;CM_Test_Range_Available
Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/cfgmgr.…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/cfgmgr.c (original)
+++ trunk/reactos/dll/win32/setupapi/cfgmgr.c Sun Jun 25 02:57:53 2006
@@ -2935,6 +2935,100 @@
/***********************************************************************
+ * CM_Set_HW_Prof_FlagsA [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Set_HW_Prof_FlagsA(
+ DEVINSTID_A szDevInstName, ULONG ulConfig, ULONG ulValue,
+ ULONG ulFlags)
+{
+ TRACE("%s %lu %lu %lx\n", szDevInstName,
+ ulConfig, ulValue, ulFlags);
+ return CM_Set_HW_Prof_Flags_ExA(szDevInstName, ulConfig, ulValue,
+ ulFlags, NULL);
+}
+
+
+/***********************************************************************
+ * CM_Set_HW_Prof_FlagsW [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Set_HW_Prof_FlagsW(
+ DEVINSTID_W szDevInstName, ULONG ulConfig, ULONG ulValue,
+ ULONG ulFlags)
+{
+ TRACE("%s %lu %lu %lx\n", debugstr_w(szDevInstName),
+ ulConfig, ulValue, ulFlags);
+ return CM_Set_HW_Prof_Flags_ExW(szDevInstName, ulConfig, ulValue,
+ ulFlags, NULL);
+}
+
+
+/***********************************************************************
+ * CM_Set_HW_Prof_Flags_ExA [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Set_HW_Prof_Flags_ExA(
+ DEVINSTID_A szDevInstName, ULONG ulConfig, ULONG ulValue,
+ ULONG ulFlags, HMACHINE hMachine)
+{
+ DEVINSTID_W pszDevIdW = NULL;
+ CONFIGRET ret = CR_SUCCESS;
+
+ TRACE("%s %lu %lu %lx %lx\n", szDevInstName,
+ ulConfig, ulValue, ulFlags, hMachine);
+
+ if (szDevInstName != NULL)
+ {
+ if (CaptureAndConvertAnsiArg(szDevInstName, &pszDevIdW))
+ return CR_INVALID_DEVICE_ID;
+ }
+
+ ret = CM_Set_HW_Prof_Flags_ExW(pszDevIdW, ulConfig, ulValue,
+ ulFlags, hMachine);
+
+ if (pszDevIdW != NULL)
+ MyFree(pszDevIdW);
+
+ return ret;
+}
+
+
+/***********************************************************************
+ * CM_Set_HW_Prof_Flags_ExW [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Set_HW_Prof_Flags_ExW(
+ DEVINSTID_W szDevInstName, ULONG ulConfig, ULONG ulValue,
+ ULONG ulFlags, HMACHINE hMachine)
+{
+ RPC_BINDING_HANDLE BindingHandle = NULL;
+
+ FIXME("%s %lu %lu %lx %lx\n", debugstr_w(szDevInstName),
+ ulConfig, ulValue, ulFlags, hMachine);
+
+ if (szDevInstName == NULL)
+ return CR_INVALID_POINTER;
+
+ if (ulFlags & ~ CM_SET_HW_PROF_FLAGS_BITS)
+ return CR_INVALID_FLAG;
+
+ /* FIXME: Check whether szDevInstName is valid */
+
+ if (hMachine != NULL)
+ {
+ BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle;
+ if (BindingHandle == NULL)
+ return CR_FAILURE;
+ }
+ else
+ {
+ if (!PnpGetLocalHandles(&BindingHandle, NULL))
+ return CR_FAILURE;
+ }
+
+ return PNP_HwProfFlags(BindingHandle, PNP_SET_HW_PROFILE_FLAGS, szDevInstName,
+ ulConfig, &ulValue, 0);
+}
+
+
+/***********************************************************************
* CM_Setup_DevNode [SETUPAPI.@]
*/
CONFIGRET WINAPI CM_Setup_DevNode(
Modified: trunk/reactos/dll/win32/setupapi/setupapi.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/setupap…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/setupapi.spec (original)
+++ trunk/reactos/dll/win32/setupapi/setupapi.spec Sun Jun 25 02:57:53 2006
@@ -179,10 +179,10 @@
@ stdcall CM_Set_DevNode_Registry_Property_ExW(long long ptr long long long)
@ stub CM_Set_HW_Prof
@ stub CM_Set_HW_Prof_Ex
-@ stub CM_Set_HW_Prof_FlagsA
-@ stub CM_Set_HW_Prof_FlagsW
-@ stub CM_Set_HW_Prof_Flags_ExA
-@ stub CM_Set_HW_Prof_Flags_ExW
+@ stdcall CM_Set_HW_Prof_FlagsA(str long long long)
+@ stdcall CM_Set_HW_Prof_FlagsW(wstr long long long)
+@ stdcall CM_Set_HW_Prof_Flags_ExA(str long long long long)
+@ stdcall CM_Set_HW_Prof_Flags_ExW(wstr long long long long)
@ stdcall CM_Setup_DevNode(long long)
@ stdcall CM_Setup_DevNode_Ex(long long long)
@ stub CM_Test_Range_Available
Modified: trunk/reactos/include/ddk/cfgmgr32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/cfgmgr32.h?rev…
==============================================================================
--- trunk/reactos/include/ddk/cfgmgr32.h (original)
+++ trunk/reactos/include/ddk/cfgmgr32.h Sun Jun 25 02:57:53 2006
@@ -2072,8 +2072,57 @@
/* FIXME: Obsolete CM_Set_HW_Prof */
/* FIXME: Obsolete CM_Set_HW_Prof_Ex */
-/* FIXME: Obsolete CM_Set_HW_Prof_Flags */
-/* FIXME: Obsolete CM_Set_HW_Prof_Flags_Ex */
+
+/* CM_Set_HW_Prof_Flags[_Ex].ulFlags constants */
+#define CM_SET_HW_PROF_FLAGS_UI_NOT_OK (0x00000001)
+#define CM_SET_HW_PROF_FLAGS_BITS (0x00000001)
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_HW_Prof_FlagsA(
+ IN DEVINSTID_A szDevInstName,
+ IN ULONG ulConfig,
+ IN ULONG ulValue,
+ IN ULONG ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_HW_Prof_FlagsW(
+ IN DEVINSTID_W szDevInstName,
+ IN ULONG ulConfig,
+ IN ULONG ulValue,
+ IN ULONG ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_HW_Prof_Flags_ExA(
+ IN DEVINSTID_A szDevInstName,
+ IN ULONG ulConfig,
+ IN ULONG ulValue,
+ IN ULONG ulFlags,
+ IN HMACHINE hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_HW_Prof_Flags_ExW(
+ IN DEVINSTID_W szDevInstName,
+ IN ULONG ulConfig,
+ IN ULONG ulValue,
+ IN ULONG ulFlags,
+ IN HMACHINE hMachine);
+
+#ifdef UNICODE
+#define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsW
+#define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExW
+#else
+#define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsA
+#define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExA
+#endif /* UNICODE */
+
/* FIXME: Obsolete CM_Setup_DevNode */
/* FIXME: Obsolete CM_Setup_DevNode_Ex */
/* FIXME: Obsolete CM_Test_Range_Available */
Modified: trunk/reactos/include/reactos/wine/cfgmgr32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/cfgmg…
==============================================================================
--- trunk/reactos/include/reactos/wine/cfgmgr32.h (original)
+++ trunk/reactos/include/reactos/wine/cfgmgr32.h Sun Jun 25 02:57:53 2006
@@ -185,6 +185,9 @@
#define CM_CREATE_DEVINST_DO_NOT_INSTALL CM_CREATE_DEVNODE_DO_NOT_INSTALL
#define CM_CREATE_DEVINST_BITS CM_CREATE_DEVNODE_BITS
+/* ulFlags for CM_Set_HW_Prof_Flags[_Ex]A/W */
+#define CM_SET_HW_PROF_FLAGS_UI_NOT_OK 0x00000001
+#define CM_SET_HW_PROF_FLAGS_BITS 0x00000001
#define CMP_MAGIC 0x01234567
@@ -319,6 +322,12 @@
CONFIGRET WINAPI CM_Set_DevNode_Registry_Property_ExW( DEVINST, ULONG, PCVOID, ULONG,
ULONG, HMACHINE );
#define CM_Set_DevNode_Registry_Property_Ex
WINELIB_NAME_AW(CM_Set_DevNode_Registry_Property_Ex)
+CONFIGRET WINAPI CM_Set_HW_Prof_FlagsA( DEVINSTID_A, ULONG, ULONG, ULONG );
+CONFIGRET WINAPI CM_Set_HW_Prof_FlagsW( DEVINSTID_W, ULONG, ULONG, ULONG );
+#define CM_Set_HW_Prof_Flags WINELIB_NAME_AW(CM_Set_HW_Prof_Flags)
+CONFIGRET WINAPI CM_Set_HW_Prof_Flags_ExA( DEVINSTID_A, ULONG, ULONG, ULONG, HMACHINE );
+CONFIGRET WINAPI CM_Set_HW_Prof_Flags_ExW( DEVINSTID_W, ULONG, ULONG, ULONG, HMACHINE );
+#define CM_Set_HW_Prof_Flags_Ex WINELIB_NAME_AW(CM_Set_HW_Prof_Flags_Ex)
CONFIGRET WINAPI CM_Setup_DevNode( DEVINST, ULONG );
CONFIGRET WINAPI CM_Setup_DevNode_Ex( DEVINST, ULONG, HMACHINE );