Author: ekohl
Date: Sun Jun 18 18:36:42 2006
New Revision: 22391
URL:
http://svn.reactos.ru/svn/reactos?rev=22391&view=rev
Log:
Implement CM_Get_HW_Prof_Flags[_Ex]A/W and add PNP_HwProfFlags stub.
Modified:
trunk/reactos/base/services/umpnpmgr/umpnpmgr.c
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/idl/pnp.idl
trunk/reactos/include/reactos/wine/cfgmgr32.h
Modified: trunk/reactos/base/services/umpnpmgr/umpnpmgr.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/services/umpnpmgr/umpn…
==============================================================================
--- trunk/reactos/base/services/umpnpmgr/umpnpmgr.c (original)
+++ trunk/reactos/base/services/umpnpmgr/umpnpmgr.c Sun Jun 18 18:36:42 2006
@@ -1222,6 +1222,27 @@
}
+/* Function 40 */
+CONFIGRET
+PNP_HwProfFlags(handle_t BindingHandle,
+ unsigned long Action,
+ wchar_t *DeviceId,
+ unsigned long ProfileId,
+ unsigned long *Value, // out
+ unsigned long Flags)
+{
+ CONFIGRET ret = CR_SUCCESS;
+
+ DPRINT1("PNP_HwProfFlags() called\n");
+
+ ret = CR_CALL_NOT_IMPLEMENTED; /* FIXME */
+
+ DPRINT1("PNP_HwProfFlags() done (returns %lx)\n", ret);
+
+ return ret;
+}
+
+
/* Function 58 */
CONFIGRET
PNP_RunDetection(handle_t BindingHandle,
Modified: trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/cfgmgr32/cfgmgr32…
==============================================================================
--- trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def (original)
+++ trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def Sun Jun 18 18:36:42 2006
@@ -117,10 +117,10 @@
;CM_Get_First_Log_Conf_Ex
CM_Get_Global_State(a)8=SETUPAPI.CM_Get_Global_State
CM_Get_Global_State_Ex(a)12=SETUPAPI.CM_Get_Global_State_Ex
-;CM_Get_HW_Prof_FlagsA
-;CM_Get_HW_Prof_FlagsW
-;CM_Get_HW_Prof_Flags_ExA
-;CM_Get_HW_Prof_Flags_ExW
+CM_Get_HW_Prof_FlagsA(a)16=SETUPAPI.CM_Get_HW_Prof_FlagsA
+CM_Get_HW_Prof_FlagsW(a)16=SETUPAPI.CM_Get_HW_Prof_FlagsW
+CM_Get_HW_Prof_Flags_ExA(a)20=SETUPAPI.CM_Get_HW_Prof_Flags_ExA
+CM_Get_HW_Prof_Flags_ExW(a)20=SETUPAPI.CM_Get_HW_Prof_Flags_ExW
;CM_Get_Hardware_Profile_InfoA
;CM_Get_Hardware_Profile_InfoW
;CM_Get_Hardware_Profile_Info_ExA
Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/cfgmgr.c…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/cfgmgr.c (original)
+++ trunk/reactos/dll/win32/setupapi/cfgmgr.c Sun Jun 18 18:36:42 2006
@@ -1779,6 +1779,102 @@
}
return PNP_GetGlobalState(BindingHandle, pulState, ulFlags);
+}
+
+
+/***********************************************************************
+ * CM_Get_HW_Prof_FlagsA [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Get_HW_Prof_FlagsA(
+ DEVINSTID_A szDevInstName, ULONG ulHardwareProfile, PULONG pulValue,
+ ULONG ulFlags)
+{
+ TRACE("%s %lu %p %lx\n", szDevInstName,
+ ulHardwareProfile, pulValue, ulFlags);
+
+ return CM_Get_HW_Prof_Flags_ExA(szDevInstName, ulHardwareProfile,
+ pulValue, ulFlags, NULL);
+}
+
+
+/***********************************************************************
+ * CM_Get_HW_Prof_FlagsW [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Get_HW_Prof_FlagsW(
+ DEVINSTID_W szDevInstName, ULONG ulHardwareProfile, PULONG pulValue,
+ ULONG ulFlags)
+{
+ TRACE("%s %lu %p %lx\n", debugstr_w(szDevInstName),
+ ulHardwareProfile, pulValue, ulFlags);
+
+ return CM_Get_HW_Prof_Flags_ExW(szDevInstName, ulHardwareProfile,
+ pulValue, ulFlags, NULL);
+}
+
+
+/***********************************************************************
+ * CM_Get_HW_Prof_Flags_ExA [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Get_HW_Prof_Flags_ExA(
+ DEVINSTID_A szDevInstName, ULONG ulHardwareProfile, PULONG pulValue,
+ ULONG ulFlags, HMACHINE hMachine)
+{
+ DEVINSTID_W pszDevIdW = NULL;
+ CONFIGRET ret = CR_SUCCESS;
+
+ TRACE("%s %lu %p %lx %lx\n", szDevInstName,
+ ulHardwareProfile, pulValue, ulFlags, hMachine);
+
+ if (szDevInstName != NULL)
+ {
+ if (CaptureAndConvertAnsiArg(szDevInstName, &pszDevIdW))
+ return CR_INVALID_DEVICE_ID;
+ }
+
+ ret = CM_Get_HW_Prof_Flags_ExW(pszDevIdW, ulHardwareProfile,
+ pulValue, ulFlags, hMachine);
+
+ if (pszDevIdW != NULL)
+ MyFree(pszDevIdW);
+
+ return ret;
+}
+
+
+/***********************************************************************
+ * CM_Get_HW_Prof_Flags_ExW [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Get_HW_Prof_Flags_ExW(
+ DEVINSTID_W szDevInstName, ULONG ulHardwareProfile, PULONG pulValue,
+ ULONG ulFlags, HMACHINE hMachine)
+{
+ RPC_BINDING_HANDLE BindingHandle = NULL;
+
+ FIXME("%s %lu %p %lx %lx\n", debugstr_w(szDevInstName),
+ ulHardwareProfile, pulValue, ulFlags, hMachine);
+
+ if ((szDevInstName == NULL) || (pulValue == NULL))
+ return CR_INVALID_POINTER;
+
+ if (ulFlags != 0)
+ 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_GET_HW_PROFILE_FLAGS, szDevInstName,
+ ulHardwareProfile, pulValue, 0);
}
Modified: trunk/reactos/dll/win32/setupapi/setupapi.spec
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/setupapi…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/setupapi.spec (original)
+++ trunk/reactos/dll/win32/setupapi/setupapi.spec Sun Jun 18 18:36:42 2006
@@ -101,10 +101,10 @@
@ stub CM_Get_First_Log_Conf_Ex
@ stdcall CM_Get_Global_State(ptr long)
@ stdcall CM_Get_Global_State_Ex(ptr long long)
-@ stub CM_Get_HW_Prof_FlagsA
-@ stub CM_Get_HW_Prof_FlagsW
-@ stub CM_Get_HW_Prof_Flags_ExA
-@ stub CM_Get_HW_Prof_Flags_ExW
+@ stdcall CM_Get_HW_Prof_FlagsA(str long ptr long)
+@ stdcall CM_Get_HW_Prof_FlagsW(wstr long ptr long)
+@ stdcall CM_Get_HW_Prof_Flags_ExA(str long ptr long long)
+@ stdcall CM_Get_HW_Prof_Flags_ExW(wstr long ptr long long)
@ stub CM_Get_Hardware_Profile_InfoA
@ stub CM_Get_Hardware_Profile_InfoW
@ stub CM_Get_Hardware_Profile_Info_ExA
Modified: trunk/reactos/include/ddk/cfgmgr32.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/ddk/cfgmgr32.h?rev=…
==============================================================================
--- trunk/reactos/include/ddk/cfgmgr32.h (original)
+++ trunk/reactos/include/ddk/cfgmgr32.h Sun Jun 18 18:36:42 2006
@@ -1428,8 +1428,52 @@
/* FIXME: Obsolete CM_Get_Hardware_Profile_Info */
/* FIXME: Obsolete CM_Get_Hardware_Profile_Info_Ex */
-/* FIXME: Obsolete CM_Get_HW_Prof_Flags */
-/* FIXME: Obsolete CM_Get_HW_Prof_Flags_Ex */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_HW_Prof_FlagsA(
+ IN DEVINSTID_A szDevInstName,
+ IN ULONG ulHardwareProfile,
+ OUT PULONG pulValue,
+ IN ULONG ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_HW_Prof_FlagsW(
+ IN DEVINSTID_W szDevInstName,
+ IN ULONG ulHardwareProfile,
+ OUT PULONG pulValue,
+ IN ULONG ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_HW_Prof_Flags_ExA(
+ IN DEVINSTID_A szDevInstName,
+ IN ULONG ulHardwareProfile,
+ OUT PULONG pulValue,
+ IN ULONG ulFlags,
+ IN HMACHINE hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_HW_Prof_Flags_ExW(
+ IN DEVINSTID_W szDevInstName,
+ IN ULONG ulHardwareProfile,
+ OUT PULONG pulValue,
+ IN ULONG ulFlags,
+ IN HMACHINE hMachine);
+
+#ifdef UNICODE
+#define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsW
+#define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExW
+#else
+#define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsA
+#define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExA
+#endif /* UNICODE */
CMAPI
CONFIGRET
Modified: trunk/reactos/include/reactos/idl/pnp.idl
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/reactos/idl/pnp.idl…
==============================================================================
--- trunk/reactos/include/reactos/idl/pnp.idl (original)
+++ trunk/reactos/include/reactos/idl/pnp.idl Sun Jun 18 18:36:42 2006
@@ -187,6 +187,16 @@
/* Function 39 */
CONFIGRET PNP_RequestEjectPC(handle_t BindingHandle);
+ /* Function 40 */
+ cpp_quote("#define PNP_SET_HW_PROFILE_FLAGS 0")
+ cpp_quote("#define PNP_GET_HW_PROFILE_FLAGS 1")
+ CONFIGRET PNP_HwProfFlags(handle_t BindingHandle,
+ [in] DWORD Action,
+ [in, string] wchar_t *DeviceId,
+ [in] DWORD ProfileId,
+ [in, out] unsigned long *Value,
+ [in] DWORD Flags);
+
/* Function 58 */
CONFIGRET PNP_RunDetection(handle_t BindingHandle,
[in] unsigned long Flags);
Modified: trunk/reactos/include/reactos/wine/cfgmgr32.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/reactos/wine/cfgmgr…
==============================================================================
--- trunk/reactos/include/reactos/wine/cfgmgr32.h (original)
+++ trunk/reactos/include/reactos/wine/cfgmgr32.h Sun Jun 18 18:36:42 2006
@@ -270,6 +270,12 @@
CONFIGRET WINAPI CM_Get_Device_ID_Size_Ex( PULONG, DEVINST, ULONG, HMACHINE );
CONFIGRET WINAPI CM_Get_Global_State( PULONG, ULONG );
CONFIGRET WINAPI CM_Get_Global_State_Ex( PULONG, ULONG, HMACHINE );
+CONFIGRET WINAPI CM_Get_HW_Prof_FlagsA( DEVINSTID_A, ULONG, PULONG, ULONG );
+CONFIGRET WINAPI CM_Get_HW_Prof_FlagsW( DEVINSTID_W, ULONG, PULONG, ULONG );
+#define CM_Get_HW_Prof_Flags WINELIB_NAME_AW(CM_Get_HW_Prof_Flags)
+CONFIGRET WINAPI CM_Get_HW_Prof_Flags_ExA( DEVINSTID_A, ULONG, PULONG, ULONG, HMACHINE
);
+CONFIGRET WINAPI CM_Get_HW_Prof_Flags_ExW( DEVINSTID_W, ULONG, PULONG, ULONG, HMACHINE
);
+#define CM_Get_HW_Prof_Flags_Ex WINELIB_NAME_AW(CM_Get_HW_Prof_Flags_Ex)
CONFIGRET WINAPI CM_Get_Parent( PDEVINST, DEVINST, ULONG );
CONFIGRET WINAPI CM_Get_Parent_Ex( PDEVINST, DEVINST, ULONG, HMACHINE );
CONFIGRET WINAPI CM_Get_Sibling( PDEVINST, DEVINST, ULONG );