Author: ekohl Date: Sat Jul 22 18:45:14 2006 New Revision: 23225
URL: http://svn.reactos.org/svn/reactos?rev=23225&view=rev Log: Implement CM_Get_Next_Log_Conf[_Ex] and add PNP_GetNextLogConf 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/reactos/idl/pnp.idl trunk/reactos/include/reactos/wine/cfgmgr32.h
Modified: trunk/reactos/base/services/umpnpmgr/umpnpmgr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/umpnpmgr/umpn... ============================================================================== --- trunk/reactos/base/services/umpnpmgr/umpnpmgr.c (original) +++ trunk/reactos/base/services/umpnpmgr/umpnpmgr.c Sat Jul 22 18:45:14 2006 @@ -1284,7 +1284,7 @@ }
-/* Function 42 */ +/* Function 44 */ CONFIGRET PNP_GetFirstLogConf(handle_t BindingHandle, wchar_t *DeviceInstance, @@ -1299,6 +1299,27 @@ *pulLogConfTag = 0; /* FIXME */
DPRINT1("PNP_GetFirstLogConf() done (returns %lx)\n", ret); + + return ret; +} + + +/* Function 45 */ +CONFIGRET +PNP_GetNextLogConf(handle_t BindingHandle, + wchar_t *DeviceInstance, + ULONG ulLogConfType, + ULONG ulCurrentTag, + ULONG *pulNextTag, + ULONG ulFlags) +{ + CONFIGRET ret = CR_SUCCESS; + + DPRINT1("PNP_GetNextLogConf() called\n"); + + *pulNextTag = 0; /* FIXME */ + + DPRINT1("PNP_GetNextLogConf() done (returns %lx)\n", ret);
return ret; }
Modified: trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cfgmgr32/cfgmgr32... ============================================================================== --- trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def (original) +++ trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def Sat Jul 22 18:45:14 2006 @@ -25,14 +25,12 @@ ;CMP_UnregisterNotification ;CMP_WaitNoPendingInstallEvents ;CMP_WaitServices -;CM_Add_Empty_Log_Conf=SETUPAPI.CM_Add_Empty_Log_Conf -;CM_Add_Empty_Log_Conf_Ex=SETUPAPI.CM_Add_Empty_Log_Conf_Ex +CM_Add_Empty_Log_Conf=SETUPAPI.CM_Add_Empty_Log_Conf +CM_Add_Empty_Log_Conf_Ex=SETUPAPI.CM_Add_Empty_Log_Conf_Ex CM_Add_IDA=SETUPAPI.CM_Add_IDA CM_Add_IDW=SETUPAPI.CM_Add_IDW CM_Add_ID_ExA=SETUPAPI.CM_Add_ID_ExA CM_Add_ID_ExW=SETUPAPI.CM_Add_ID_ExW -CM_Add_Empty_Log_Conf=SETUPAPI.CM_Add_Empty_Log_Conf -CM_Add_Empty_Log_Conf_Ex=SETUPAPI.CM_Add_Empty_Log_Conf_Ex CM_Add_IDA=SETUPAPI.CM_Add_IDA CM_Add_IDW=SETUPAPI.CM_Add_IDW CM_Add_ID_ExA=SETUPAPI.CM_Add_ID_ExA @@ -133,8 +131,8 @@ ;CM_Get_Hardware_Profile_Info_ExW ;CM_Get_Log_Conf_Priority ;CM_Get_Log_Conf_Priority_Ex -;CM_Get_Next_Log_Conf -;CM_Get_Next_Log_Conf_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 ;CM_Get_Next_Res_Des_Ex CM_Get_Parent=SETUPAPI.CM_Get_Parent
Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/cfgmgr.c... ============================================================================== --- trunk/reactos/dll/win32/setupapi/cfgmgr.c (original) +++ trunk/reactos/dll/win32/setupapi/cfgmgr.c Sat Jul 22 18:45:14 2006 @@ -2159,6 +2159,91 @@
return PNP_HwProfFlags(BindingHandle, PNP_GET_HW_PROFILE_FLAGS, szDevInstName, ulHardwareProfile, pulValue, 0); +} + + +/*********************************************************************** + * CM_Get_Next_Log_Conf [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_Next_Log_Conf( + PLOG_CONF plcLogConf, LOG_CONF lcLogConf, ULONG ulFlags) +{ + TRACE("%p %p %lx\n", plcLogConf, lcLogConf, ulFlags); + return CM_Get_Next_Log_Conf_Ex(plcLogConf, lcLogConf, ulFlags, NULL); +} + + +/*********************************************************************** + * CM_Get_Next_Log_Conf_Ex [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_Next_Log_Conf_Ex( + PLOG_CONF plcLogConf, LOG_CONF lcLogConf, ULONG ulFlags, + HMACHINE hMachine) +{ + RPC_BINDING_HANDLE BindingHandle = NULL; + HSTRING_TABLE StringTable = NULL; + PLOG_CONF_INFO pLogConfInfo; + PLOG_CONF_INFO pNewLogConfInfo; + ULONG ulNewTag; + LPWSTR lpDevInst; + CONFIGRET ret; + + FIXME("%p %p %lx %lx\n", plcLogConf, lcLogConf, ulFlags, hMachine); + + if (plcLogConf) + *plcLogConf = 0; + + pLogConfInfo = (PLOG_CONF_INFO)lcLogConf; + if (pLogConfInfo == NULL || pLogConfInfo->ulMagic != LOG_CONF_MAGIC) + return CR_INVALID_LOG_CONF; + + 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; + + ret = PNP_GetNextLogConf(BindingHandle, + lpDevInst, + pLogConfInfo->ulFlags, + pLogConfInfo->ulTag, + &ulNewTag, + 0); + if (ret != CR_SUCCESS) + return ret; + + if (plcLogConf) + { + pNewLogConfInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_CONF_INFO)); + if (pNewLogConfInfo == NULL) + return CR_OUT_OF_MEMORY; + + pNewLogConfInfo->ulMagic = LOG_CONF_MAGIC; + pNewLogConfInfo->dnDevInst = pLogConfInfo->dnDevInst; + pNewLogConfInfo->ulFlags = pLogConfInfo->ulFlags; + pNewLogConfInfo->ulTag = ulNewTag; + + *plcLogConf = (LOG_CONF)pNewLogConfInfo; + } + + return CR_SUCCESS; }
Modified: trunk/reactos/dll/win32/setupapi/setupapi.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/setupapi... ============================================================================== --- trunk/reactos/dll/win32/setupapi/setupapi.spec (original) +++ trunk/reactos/dll/win32/setupapi/setupapi.spec Sat Jul 22 18:45:14 2006 @@ -111,8 +111,8 @@ @ stub CM_Get_Hardware_Profile_Info_ExW @ stub CM_Get_Log_Conf_Priority @ stub CM_Get_Log_Conf_Priority_Ex -@ stub CM_Get_Next_Log_Conf -@ stub CM_Get_Next_Log_Conf_Ex +@ 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 @ stub CM_Get_Next_Res_Des_Ex @ stdcall CM_Get_Parent(ptr long long)
Modified: trunk/reactos/include/reactos/idl/pnp.idl URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/pnp.idl... ============================================================================== --- trunk/reactos/include/reactos/idl/pnp.idl (original) +++ trunk/reactos/include/reactos/idl/pnp.idl Sat Jul 22 18:45:14 2006 @@ -219,6 +219,14 @@ [out] ULONG *pulLogConfTag, [in] ULONG ulFlags);
+ /* Function 45 */ + CONFIGRET PNP_GetNextLogConf(handle_t BindingHandle, + [in, string] wchar_t *DeviceInstance, + [in] ULONG ulLogConfType, + [in] ULONG ulCurrentTag, + [out] ULONG *pulNextTag, + [in] ULONG ulFlags); + /* Function 58 */ CONFIGRET PNP_RunDetection(handle_t BindingHandle, [in] unsigned long Flags);
Modified: trunk/reactos/include/reactos/wine/cfgmgr32.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/cfgmgr... ============================================================================== --- trunk/reactos/include/reactos/wine/cfgmgr32.h (original) +++ trunk/reactos/include/reactos/wine/cfgmgr32.h Sat Jul 22 18:45:14 2006 @@ -307,6 +307,8 @@ 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_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 ); CONFIGRET WINAPI CM_Get_Parent_Ex( PDEVINST, DEVINST, ULONG, HMACHINE ); CONFIGRET WINAPI CM_Get_Sibling( PDEVINST, DEVINST, ULONG );