Author: ekohl
Date: Fri Jul 14 01:28:01 2006
New Revision: 23049
URL:
http://svn.reactos.org/svn/reactos?rev=23049&view=rev
Log:
Implement CM_Free_Log_Conf[_Ex] and add PNP_FreeLogConf 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/ump…
==============================================================================
--- trunk/reactos/base/services/umpnpmgr/umpnpmgr.c (original)
+++ trunk/reactos/base/services/umpnpmgr/umpnpmgr.c Fri Jul 14 01:28:01 2006
@@ -1250,16 +1250,35 @@
PNP_AddEmptyLogConf(handle_t BindingHandle,
wchar_t *DeviceInstance,
ULONG ulPriority,
- ULONG *ulLogConfTag,
+ ULONG *pulLogConfTag,
ULONG ulFlags)
{
CONFIGRET ret = CR_SUCCESS;
DPRINT1("PNP_AddEmptyLogConf() called\n");
- *ulLogConfTag = 0; /* FIXME */
+ *pulLogConfTag = 0; /* FIXME */
DPRINT1("PNP_AddEmptyLogConf() done (returns %lx)\n", ret);
+
+ return ret;
+}
+
+
+/* Function 43 */
+CONFIGRET
+PNP_FreeLogConf(handle_t BindingHandle,
+ wchar_t *DeviceInstance,
+ ULONG ulType,
+ ULONG ulLogConfTag,
+ ULONG ulFlags)
+{
+ CONFIGRET ret = CR_SUCCESS;
+
+ DPRINT1("PNP_FreeLogConf() called\n");
+
+
+ DPRINT1("PNP_FreeLogConf() 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/cfgmgr3…
==============================================================================
--- trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def (original)
+++ trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def Fri Jul 14 01:28:01 2006
@@ -68,9 +68,9 @@
CM_Enumerate_Enumerators_ExW=SETUPAPI.CM_Enumerate_Enumerators_ExW
;CM_Find_Range
;CM_First_Range
-;CM_Free_Log_Conf
-;CM_Free_Log_Conf_Ex
-CM_Free_Log_Conf_Handle(a)4=SETUPAPI.CM_Free_Log_Conf_Handle
+CM_Free_Log_Conf=SETUPAPI.CM_Free_Log_Conf
+CM_Free_Log_Conf_Ex=SETUPAPI.CM_Free_Log_Conf_Ex
+CM_Free_Log_Conf_Handle=SETUPAPI.CM_Free_Log_Conf_Handle
;CM_Free_Range_List
;CM_Free_Res_Des
;CM_Free_Res_Des_Ex
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 Fri Jul 14 01:28:01 2006
@@ -915,6 +915,65 @@
*pulLength,
pulLength,
ulFlags);
+}
+
+
+/***********************************************************************
+ * CM_Free_Log_Conf [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Free_Log_Conf(
+ LOG_CONF lcLogConfToBeFreed, ULONG ulFlags)
+{
+ TRACE("%lx %lx\n", lcLogConfToBeFreed, ulFlags);
+ return CM_Free_Log_Conf_Ex(lcLogConfToBeFreed, ulFlags, NULL);
+}
+
+
+/***********************************************************************
+ * CM_Free_Log_Conf_Ex [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Free_Log_Conf_Ex(
+ LOG_CONF lcLogConfToBeFreed, ULONG ulFlags, HMACHINE hMachine)
+{
+ RPC_BINDING_HANDLE BindingHandle = NULL;
+ HSTRING_TABLE StringTable = NULL;
+ LPWSTR lpDevInst;
+ PLOG_CONF_INFO pLogConfInfo;
+
+ TRACE("%lx %lx %lx\n", lcLogConfToBeFreed, ulFlags, hMachine);
+
+ if (!IsUserAdmin())
+ return CR_ACCESS_DENIED;
+
+ pLogConfInfo = (PLOG_CONF_INFO)lcLogConfToBeFreed;
+ 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;
+
+ return PNP_FreeLogConf(BindingHandle, lpDevInst, pLogConfInfo->ulFlags,
+ pLogConfInfo->ulTag, 0);
}
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 Fri Jul 14 01:28:01 2006
@@ -46,8 +46,8 @@
@ stdcall CM_Enumerate_Enumerators_ExW(long wstr ptr long long)
@ stub CM_Find_Range
@ stub CM_First_Range
-@ stub CM_Free_Log_Conf
-@ stub CM_Free_Log_Conf_Ex
+@ stdcall CM_Free_Log_Conf(ptr long)
+@ stdcall CM_Free_Log_Conf_Ex(ptr long ptr)
@ stdcall CM_Free_Log_Conf_Handle(ptr)
@ stub CM_Free_Range_List
@ stub CM_Free_Res_Des
Modified: trunk/reactos/include/reactos/idl/pnp.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/pnp.id…
==============================================================================
--- trunk/reactos/include/reactos/idl/pnp.idl (original)
+++ trunk/reactos/include/reactos/idl/pnp.idl Fri Jul 14 01:28:01 2006
@@ -202,8 +202,15 @@
CONFIGRET PNP_AddEmptyLogConf(handle_t BindingHandle,
[in, string] wchar_t *DeviceInstance,
[in] ULONG ulPriority,
- [out] ULONG *ulLogConfTag,
+ [out] ULONG *pulLogConfTag,
[in] ULONG ulFlags);
+
+ /* Function 43 */
+ CONFIGRET PNP_FreeLogConf(handle_t BindingHandle,
+ [in, string] wchar_t *DeviceInstance,
+ [in] ULONG ulType,
+ [in] ULONG ulLogConfTag,
+ [in] ULONG ulFlags);
/* Function 58 */
CONFIGRET PNP_RunDetection(handle_t BindingHandle,
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 Fri Jul 14 01:28:01 2006
@@ -250,6 +250,8 @@
CONFIGRET WINAPI CM_Enumerate_Enumerators_ExA( ULONG, PCHAR, PULONG, ULONG, HMACHINE );
CONFIGRET WINAPI CM_Enumerate_Enumerators_ExW( ULONG, PWCHAR, PULONG, ULONG, HMACHINE );
#define CM_Enumerate_Enumerators_Ex WINELIB_NAME_AW(CM_Enumerate_Enumerators_Ex)
+CONFIGRET WINAPI CM_Free_Log_Conf( LOG_CONF, ULONG );
+CONFIGRET WINAPI CM_Free_Log_Conf_Ex( LOG_CONF, ULONG, HMACHINE );
CONFIGRET WINAPI CM_Free_Log_Conf_Handle( LOG_CONF );
CONFIGRET WINAPI CM_Get_Child( PDEVINST, DEVINST, ULONG );
CONFIGRET WINAPI CM_Get_Child_Ex( PDEVINST, DEVINST, ULONG, HMACHINE );