Author: ekohl Date: Sun Jul 16 16:11:26 2006 New Revision: 23074
URL: http://svn.reactos.org/svn/reactos?rev=23074&view=rev Log: Implement CM_Get_First_Log_Conf[_Ex] and add PNP_GetFirstLogConf 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 Sun Jul 16 16:11:26 2006 @@ -1284,6 +1284,26 @@ }
+/* Function 42 */ +CONFIGRET +PNP_GetFirstLogConf(handle_t BindingHandle, + wchar_t *DeviceInstance, + ULONG ulPriority, + ULONG *pulLogConfTag, + ULONG ulFlags) +{ + CONFIGRET ret = CR_SUCCESS; + + DPRINT1("PNP_GetFirstLogConf() called\n"); + + *pulLogConfTag = 0; /* FIXME */ + + DPRINT1("PNP_GetFirstLogConf() 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.org/svn/reactos/trunk/reactos/dll/win32/cfgmgr32/cfgmgr32... ============================================================================== --- trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def (original) +++ trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def Sun Jul 16 16:11:26 2006 @@ -119,8 +119,8 @@ ;CM_Get_Device_Interface_List_SizeW ;CM_Get_Device_Interface_List_Size_ExA ;CM_Get_Device_Interface_List_Size_ExW -;CM_Get_First_Log_Conf -;CM_Get_First_Log_Conf_Ex +CM_Get_First_Log_Conf=SETUPAPI.CM_Get_First_Log_Conf +CM_Get_First_Log_Conf_Ex=SETUPAPI.CM_Get_First_Log_Conf_Ex CM_Get_Global_State=SETUPAPI.CM_Get_Global_State CM_Get_Global_State_Ex=SETUPAPI.CM_Get_Global_State_Ex CM_Get_HW_Prof_FlagsA=SETUPAPI.CM_Get_HW_Prof_FlagsA
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 Sun Jul 16 16:11:26 2006 @@ -1940,6 +1940,84 @@ }
*pulLen = lstrlenW(DeviceId); + + return CR_SUCCESS; +} + + +/*********************************************************************** + * CM_Get_First_Log_Conf [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_First_Log_Conf( + PLOG_CONF plcLogConf, DEVINST dnDevInst, ULONG ulFlags) +{ + TRACE("%p %lx %lx\n", plcLogConf, dnDevInst, ulFlags); + return CM_Get_First_Log_Conf_Ex(plcLogConf, dnDevInst, ulFlags, NULL); +} + + +/*********************************************************************** + * CM_Get_First_Log_Conf_Ex [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_First_Log_Conf_Ex( + PLOG_CONF plcLogConf, DEVINST dnDevInst, ULONG ulFlags, HMACHINE hMachine) +{ + RPC_BINDING_HANDLE BindingHandle = NULL; + HSTRING_TABLE StringTable = NULL; + LPWSTR lpDevInst = NULL; + CONFIGRET ret = CR_SUCCESS; + ULONG ulTag; + PLOG_CONF_INFO pLogConfInfo; + + FIXME("%p %lx %lx %lx\n", plcLogConf, dnDevInst, ulFlags, hMachine); + + if (dnDevInst == 0) + return CR_INVALID_DEVINST; + + if (ulFlags & ~LOG_CONF_BITS) + return CR_INVALID_FLAG; + + if (plcLogConf) + *plcLogConf = 0; + + 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, dnDevInst); + if (lpDevInst == NULL) + return CR_INVALID_DEVNODE; + + ret = PNP_GetFirstLogConf(BindingHandle, + lpDevInst, + ulFlags, + &ulTag, + ulFlags); + if (ret != CR_SUCCESS) + return ret; + + pLogConfInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(LOG_CONF_INFO)); + if (pLogConfInfo == NULL) + return CR_OUT_OF_MEMORY; + + pLogConfInfo->ulMagic = LOG_CONF_MAGIC; + pLogConfInfo->dnDevInst = dnDevInst; + pLogConfInfo->ulFlags = ulFlags; + pLogConfInfo->ulTag = ulTag; + + *plcLogConf = (LOG_CONF)pLogConfInfo;
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 Sun Jul 16 16:11:26 2006 @@ -97,8 +97,8 @@ @ stub CM_Get_Device_Interface_List_SizeW @ stub CM_Get_Device_Interface_List_Size_ExA @ stub CM_Get_Device_Interface_List_Size_ExW -@ stub CM_Get_First_Log_Conf -@ stub CM_Get_First_Log_Conf_Ex +@ stdcall CM_Get_First_Log_Conf(ptr long long) +@ stdcall CM_Get_First_Log_Conf_Ex(ptr long long long) @ stdcall CM_Get_Global_State(ptr long) @ stdcall CM_Get_Global_State_Ex(ptr long long) @ stdcall CM_Get_HW_Prof_FlagsA(str long ptr 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 Sun Jul 16 16:11:26 2006 @@ -212,6 +212,13 @@ [in] ULONG ulLogConfTag, [in] ULONG ulFlags);
+ /* Function 44 */ + CONFIGRET PNP_GetFirstLogConf(handle_t BindingHandle, + [in, string] wchar_t *DeviceInstance, + [in] ULONG ulPriority, + [out] ULONG *pulLogConfTag, + [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 Sun Jul 16 16:11:26 2006 @@ -297,6 +297,8 @@ #define CM_Get_Device_ID_List_Size_Ex WINELIB_NAME_AW(CM_Get_Device_ID_List_Size_Ex) CONFIGRET WINAPI CM_Get_Device_ID_Size( PULONG, DEVINST, ULONG ); CONFIGRET WINAPI CM_Get_Device_ID_Size_Ex( PULONG, DEVINST, ULONG, HMACHINE ); +CONFIGRET WINAPI CM_Get_First_Log_Conf( PLOG_CONF, DEVINST, ULONG ); +CONFIGRET WINAPI CM_Get_First_Log_Conf_Ex( PLOG_CONF, 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 );