Author: hpoussin
Date: Fri Jun 2 15:17:37 2006
New Revision: 22174
URL:
http://svn.reactos.ru/svn/reactos?rev=22174&view=rev
Log:
Implement CM_Add_IDA, CM_Add_IDW, CM_Add_ID_ExA
Add stub for CM_Add_ID_ExW
Modified:
trunk/reactos/dll/win32/setupapi/cfgmgr.c
trunk/reactos/dll/win32/setupapi/setupapi.spec
trunk/reactos/include/reactos/wine/cfgmgr32.h
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 Fri Jun 2 15:17:37 2006
@@ -118,6 +118,61 @@
}
return ret;
+}
+
+
+/***********************************************************************
+ * CM_Add_IDA [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Add_IDA(
+ DEVINST dnDevInst, PSTR pszID, ULONG ulFlags)
+{
+ TRACE("%p %s %lx\n", dnDevInst, pszID, ulFlags);
+ return CM_Add_ID_ExA(dnDevInst, pszID, ulFlags, NULL);
+}
+
+
+/***********************************************************************
+ * CM_Add_IDW [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Add_IDW(
+ DEVINST dnDevInst, PWSTR pszID, ULONG ulFlags)
+{
+ TRACE("%p %s %lx\n", dnDevInst, debugstr_w(pszID), ulFlags);
+ return CM_Add_ID_ExW(dnDevInst, pszID, ulFlags, NULL);
+}
+
+
+/***********************************************************************
+ * CM_Add_ID_ExA [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Add_ID_ExA(
+ DEVINST dnDevInst, PSTR pszID, ULONG ulFlags, HMACHINE hMachine)
+{
+ PWSTR pszIDW;
+ CONFIGRET ret;
+
+ TRACE("%p %s %lx %p\n", dnDevInst, pszID, ulFlags, hMachine);
+
+ if (CaptureAndConvertAnsiArg(pszID, &pszIDW))
+ return CR_INVALID_DATA;
+
+ ret = CM_Add_ID_ExW(dnDevInst, pszIDW, ulFlags, hMachine);
+
+ MyFree(pszIDW);
+
+ return ret;
+}
+
+
+/***********************************************************************
+ * CM_Add_ID_ExW [SETUPAPI.@]
+ */
+CONFIGRET WINAPI CM_Add_ID_ExW(
+ DEVINST dnDevInst, PWSTR pszID, ULONG ulFlags, HMACHINE hMachine)
+{
+ FIXME("%p %s %lx %p\n", dnDevInst, debugstr_w(pszID), ulFlags, hMachine);
+ return CR_CALL_NOT_IMPLEMENTED;
}
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 Fri Jun 2 15:17:37 2006
@@ -11,10 +11,10 @@
@ stub CMP_WaitServicesAvailable
@ stub CM_Add_Empty_Log_Conf
@ stub CM_Add_Empty_Log_Conf_Ex
-@ stub CM_Add_IDA
-@ stub CM_Add_IDW
-@ stub CM_Add_ID_ExA
-@ stub CM_Add_ID_ExW
+@ stdcall CM_Add_IDA(ptr str long)
+@ stdcall CM_Add_IDW(ptr wstr long)
+@ stdcall CM_Add_ID_ExA(ptr str long ptr)
+@ stdcall CM_Add_ID_ExW(ptr wstr long ptr)
@ stub CM_Add_Range
@ stub CM_Add_Res_Des
@ stub CM_Add_Res_Des_Ex
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 Fri Jun 2 15:17:37 2006
@@ -67,6 +67,11 @@
#define RegDisposition_OpenAlways 0x00000000
#define RegDisposition_OpenExisting 0x00000001
#define RegDisposition_Bits 0x00000001
+
+/* ulFlags for CM_Add_ID[_Ex] */
+#define CM_ADD_ID_HARDWARE 0x00000000
+#define CM_ADD_ID_COMPATIBLE 0x00000001
+#define CM_ADD_ID_BITS 0x00000001
/* ulFlags for CM_Open_Class_Key[_Ex] */
#define CM_OPEN_CLASS_KEY_INSTALLER 0x00000000
@@ -185,6 +190,12 @@
CONFIGRET WINAPI CMP_Init_Detection( DWORD );
CONFIGRET WINAPI CMP_Report_LogOn( DWORD, DWORD );
+CONFIGRET WINAPI CM_Add_IDA( DEVINST, PSTR, ULONG );
+CONFIGRET WINAPI CM_Add_IDW( DEVINST, PWSTR, ULONG );
+#define CM_Add_ID WINELIB_NAME_AW(CM_Add_ID)
+CONFIGRET WINAPI CM_Add_ID_ExA( DEVINST, PSTR, ULONG, HMACHINE );
+CONFIGRET WINAPI CM_Add_ID_ExW( DEVINST, PWSTR, ULONG, HMACHINE );
+#define CM_Add_ID_Ex WINELIB_NAME_AW(CM_Add_ID_Ex)
CONFIGRET WINAPI CM_Connect_MachineA( PCSTR, PHMACHINE );
CONFIGRET WINAPI CM_Connect_MachineW( PCWSTR, PHMACHINE );
#define CM_Connect_Machine WINELIB_NAME_AW(CM_Connect_Machine)