- Implement CM_Get_Device_List_Size_ExW
Modified: trunk/reactos/include/idl/pnp.idl
Modified: trunk/reactos/include/wine/cfgmgr32.h
Modified: trunk/reactos/lib/setupapi/cfgmgr.c
Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c
_____
Modified: trunk/reactos/include/idl/pnp.idl
--- trunk/reactos/include/idl/pnp.idl 2005-09-24 02:50:02 UTC (rev
18022)
+++ trunk/reactos/include/idl/pnp.idl 2005-09-24 09:30:43 UTC (rev
18023)
@@ -49,6 +49,17 @@
[out] unsigned long *RequiredLength,
[in] DWORD Flags);
+// CONFIGRET PNP_GetDeviceList(handle_t BindingHandle,
+// [in, unique, string] wchar_t *Filter,
+// [out, string, size_is(*Length)]
unsigned char *Buffer
+// [in, out] unsigned long *Length,
+// [in] DWORD Flags);
+
+ CONFIGRET PNP_GetDeviceListSize(handle_t BindingHandle,
+ [in, unique, string] wchar_t *Filter,
+ [out] unsigned long *Length,
+ [in] DWORD Flags);
+
CONFIGRET PNP_GetDepth(handle_t BindingHandle,
[in, string] wchar_t *DeviceInstance,
[out] unsigned long *Depth,
_____
Modified: trunk/reactos/include/wine/cfgmgr32.h
--- trunk/reactos/include/wine/cfgmgr32.h 2005-09-24 02:50:02 UTC
(rev 18022)
+++ trunk/reactos/include/wine/cfgmgr32.h 2005-09-24 09:30:43 UTC
(rev 18023)
@@ -128,7 +128,18 @@
#define CM_DELETE_CLASS_SUBKEYS 0x00000001
#define CM_DELETE_CLASS_BITS 0x00000001
+/* ulFlags for CM_Get_Device_ID_List and CM_Get_Device_ID_List_Size */
+#define CM_GETIDLIST_FILTER_NONE (0x00000000)
+#define CM_GETIDLIST_FILTER_ENUMERATOR (0x00000001)
+#define CM_GETIDLIST_FILTER_SERVICE (0x00000002)
+#define CM_GETIDLIST_FILTER_EJECTRELATIONS (0x00000004)
+#define CM_GETIDLIST_FILTER_REMOVALRELATIONS (0x00000008)
+#define CM_GETIDLIST_FILTER_POWERRELATIONS (0x00000010)
+#define CM_GETIDLIST_FILTER_BUSRELATIONS (0x00000020)
+#define CM_GETIDLIST_DONOTGENERATE (0x10000040)
+#define CM_GETIDLIST_FILTER_BITS (0x1000007F)
+
CONFIGRET WINAPI CM_Connect_MachineA( PCSTR, PHMACHINE );
CONFIGRET WINAPI CM_Connect_MachineW( PCWSTR, PHMACHINE );
#define CM_Connect_Machine WINELIB_NAME_AW(CM_Connect_Machine)
_____
Modified: trunk/reactos/lib/setupapi/cfgmgr.c
--- trunk/reactos/lib/setupapi/cfgmgr.c 2005-09-24 02:50:02 UTC (rev
18022)
+++ trunk/reactos/lib/setupapi/cfgmgr.c 2005-09-24 09:30:43 UTC (rev
18023)
@@ -1195,9 +1195,34 @@
CONFIGRET WINAPI CM_Get_Device_ID_List_Size_ExW(
PULONG pulLen, PCWSTR pszFilter, ULONG ulFlags, HMACHINE hMachine)
{
+ RPC_BINDING_HANDLE BindingHandle = NULL;
+
FIXME("%p %s %ld %lx\n", pulLen, debugstr_w(pszFilter), ulFlags,
hMachine);
- *pulLen = 2;
- return CR_SUCCESS;
+
+ if (pulLen == NULL)
+ return CR_INVALID_POINTER;
+
+ if (ulFlags & ~CM_GETIDLIST_FILTER_BITS)
+ return CR_INVALID_FLAG;
+
+ if (hMachine != NULL)
+ {
+ BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle;
+ if (BindingHandle == NULL)
+ return CR_FAILURE;
+ }
+ else
+ {
+ if (!PnpGetLocalHandles(&BindingHandle, NULL))
+ return CR_FAILURE;
+ }
+
+ *pulLen = 0;
+
+ return PNP_GetDeviceListSize(BindingHandle,
+ (LPWSTR)pszFilter,
+ pulLen,
+ ulFlags);
}
_____
Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c
--- trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-09-24 02:50:02 UTC
(rev 18022)
+++ trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-09-24 09:30:43 UTC
(rev 18023)
@@ -303,6 +303,21 @@
CONFIGRET
+PNP_GetDeviceListSize(handle_t BindingHandle,
+ wchar_t *Filter,
+ unsigned long *Length,
+ DWORD Flags)
+{
+ DPRINT("PNP_GetDeviceListSize() called\n");
+
+ /* FIXME */
+ *Length = 2;
+
+ return CR_SUCCESS;
+}
+
+
+CONFIGRET
PNP_GetDepth(handle_t BindingHandle,
wchar_t *DeviceInstance,
unsigned long *Depth,
@@ -635,6 +650,22 @@
CONFIGRET
+PNP_CreateKey(handle_t BindingHandle,
+ wchar_t *SubKey,
+ unsigned long samDesired,
+ unsigned long Flags)
+{
+ CONFIGRET ret = CR_SUCCESS;
+
+ DPRINT("PNP_CreateKey() called\n");
+
+ DPRINT("PNP_CreateKey() done (returns %lx)\n", ret);
+
+ return ret;
+}
+
+
+CONFIGRET
PNP_GetClassName(handle_t BindingHandle,
wchar_t *ClassGuid,
wchar_t *Buffer,