diff --git a/reactos/base/services/umpnpmgr/umpnpmgr.c b/reactos/base/services/umpnpmgr/umpnpmgr.c index 7e626c4d0aa..55ea0c267e5 100644 --- a/reactos/base/services/umpnpmgr/umpnpmgr.c +++ b/reactos/base/services/umpnpmgr/umpnpmgr.c @@ -1325,6 +1325,27 @@ PNP_GetNextLogConf(handle_t BindingHandle, } +/* Function 46 */ +CONFIGRET +PNP_GetLogConfPriority(handle_t BindingHandle, + wchar_t *DeviceInstance, + ULONG ulLogConfType, + ULONG ulCurrentTag, + ULONG *pPriority, + ULONG ulFlags) +{ + CONFIGRET ret = CR_SUCCESS; + + DPRINT1("PNP_GetLogConfPriority() called\n"); + + *pPriority = 0; /* FIXME */ + + DPRINT1("PNP_GetLogConfPriority() done (returns %lx)\n", ret); + + return ret; +} + + /* Function 58 */ CONFIGRET PNP_RunDetection(handle_t BindingHandle, diff --git a/reactos/dll/win32/cfgmgr32/cfgmgr32.def b/reactos/dll/win32/cfgmgr32/cfgmgr32.def index 325b0243d54..46d5b5c76b5 100644 --- a/reactos/dll/win32/cfgmgr32/cfgmgr32.def +++ b/reactos/dll/win32/cfgmgr32/cfgmgr32.def @@ -129,8 +129,8 @@ CM_Get_HW_Prof_Flags_ExW=SETUPAPI.CM_Get_HW_Prof_Flags_ExW ;CM_Get_Hardware_Profile_InfoW ;CM_Get_Hardware_Profile_Info_ExA ;CM_Get_Hardware_Profile_Info_ExW -;CM_Get_Log_Conf_Priority -;CM_Get_Log_Conf_Priority_Ex +CM_Get_Log_Conf_Priority=SETUPAPI.CM_Get_Log_Conf_Priority +CM_Get_Log_Conf_Priority_Ex=SETUPAPI.CM_Get_Log_Conf_Priority_Ex CM_Get_Next_Log_Conf=SETUPAPI.CM_Get_Next_Log_Conf CM_Get_Next_Log_Conf_Ex=SETUPAPI.CM_Get_Next_Log_Conf_Ex ;CM_Get_Next_Res_Des diff --git a/reactos/dll/win32/setupapi/cfgmgr.c b/reactos/dll/win32/setupapi/cfgmgr.c index e7f94cab813..2a2d4b4fe67 100644 --- a/reactos/dll/win32/setupapi/cfgmgr.c +++ b/reactos/dll/win32/setupapi/cfgmgr.c @@ -2162,6 +2162,70 @@ CONFIGRET WINAPI CM_Get_HW_Prof_Flags_ExW( } +/*********************************************************************** + * CM_Get_Log_Conf_Priority [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_Log_Conf_Priority( + LOG_CONF lcLogConf, PPRIORITY pPriority, ULONG ulFlags) +{ + TRACE("%p %p %lx\n", lcLogConf, pPriority, ulFlags); + return CM_Get_Log_Conf_Priority_Ex(lcLogConf, pPriority, ulFlags, NULL); +} + + +/*********************************************************************** + * CM_Get_Log_Conf_Priority_Ex [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_Log_Conf_Priority_Ex( + LOG_CONF lcLogConf, PPRIORITY pPriority, ULONG ulFlags, + HMACHINE hMachine) +{ + RPC_BINDING_HANDLE BindingHandle = NULL; + HSTRING_TABLE StringTable = NULL; + PLOG_CONF_INFO pLogConfInfo; + LPWSTR lpDevInst; + + FIXME("%p %p %lx %lx\n", lcLogConf, pPriority, ulFlags, hMachine); + + pLogConfInfo = (PLOG_CONF_INFO)lcLogConf; + if (pLogConfInfo == NULL || pLogConfInfo->ulMagic != LOG_CONF_MAGIC) + return CR_INVALID_LOG_CONF; + + if (pPriority == NULL) + return CR_INVALID_POINTER; + + if (ulFlags != 0) + return CR_INVALID_FLAG; + + if (hMachine != NULL) + { + BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle; + if (BindingHandle == NULL) + return CR_FAILURE; + + StringTable = ((PMACHINE_INFO)hMachine)->StringTable; + if (StringTable == 0) + return CR_FAILURE; + } + else + { + if (!PnpGetLocalHandles(&BindingHandle, &StringTable)) + return CR_FAILURE; + } + + lpDevInst = StringTableStringFromId(StringTable, pLogConfInfo->dnDevInst); + if (lpDevInst == NULL) + return CR_INVALID_DEVNODE; + + return PNP_GetLogConfPriority(BindingHandle, + lpDevInst, + pLogConfInfo->ulFlags, + pLogConfInfo->ulTag, + pPriority, + 0); +} + + /*********************************************************************** * CM_Get_Next_Log_Conf [SETUPAPI.@] */ diff --git a/reactos/dll/win32/setupapi/setupapi.spec b/reactos/dll/win32/setupapi/setupapi.spec index 01a1076753b..7c3bae3db34 100644 --- a/reactos/dll/win32/setupapi/setupapi.spec +++ b/reactos/dll/win32/setupapi/setupapi.spec @@ -109,8 +109,8 @@ @ stub CM_Get_Hardware_Profile_InfoW @ stub CM_Get_Hardware_Profile_Info_ExA @ stub CM_Get_Hardware_Profile_Info_ExW -@ stub CM_Get_Log_Conf_Priority -@ stub CM_Get_Log_Conf_Priority_Ex +@ stdcall CM_Get_Log_Conf_Priority(ptr ptr long) +@ stdcall CM_Get_Log_Conf_Priority_Ex(ptr ptr long long) @ stdcall CM_Get_Next_Log_Conf(ptr ptr long) @ stdcall CM_Get_Next_Log_Conf_Ex(ptr ptr long long) @ stub CM_Get_Next_Res_Des diff --git a/reactos/include/reactos/idl/pnp.idl b/reactos/include/reactos/idl/pnp.idl index eae1cc02c16..90e8b978ed1 100644 --- a/reactos/include/reactos/idl/pnp.idl +++ b/reactos/include/reactos/idl/pnp.idl @@ -227,6 +227,14 @@ interface pnp [out] ULONG *pulNextTag, [in] ULONG ulFlags); + /* Function 46 */ + CONFIGRET PNP_GetLogConfPriority(handle_t BindingHandle, + [in, string] wchar_t *DeviceInstance, + [in] ULONG ulLogConfType, + [in] ULONG ulCurrentTag, + [out] ULONG *pPriority, + [in] ULONG ulFlags); + /* Function 58 */ CONFIGRET PNP_RunDetection(handle_t BindingHandle, [in] unsigned long Flags); diff --git a/reactos/include/reactos/wine/cfgmgr32.h b/reactos/include/reactos/wine/cfgmgr32.h index 67d4237b453..585b5c139c4 100644 --- a/reactos/include/reactos/wine/cfgmgr32.h +++ b/reactos/include/reactos/wine/cfgmgr32.h @@ -307,6 +307,8 @@ CONFIGRET WINAPI CM_Get_HW_Prof_FlagsW( DEVINSTID_W, ULONG, PULONG, ULONG ); 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_Log_Conf_Priority( LOG_CONF, PPRIORITY, ULONG ); +CONFIGRET WINAPI CM_Get_Log_Conf_Priority_Ex( LOG_CONF, PPRIORITY, ULONG, HMACHINE ); CONFIGRET WINAPI CM_Get_Next_Log_Conf( PLOG_CONF, LOG_CONF, ULONG ); CONFIGRET WINAPI CM_Get_Next_Log_Conf_Ex( PLOG_CONF, LOG_CONF, ULONG, HMACHINE ); CONFIGRET WINAPI CM_Get_Parent( PDEVINST, DEVINST, ULONG );