diff --git a/reactos/include/idl/pnp.idl b/reactos/include/idl/pnp.idl index f4648d4fa2a..417880257d3 100644 --- a/reactos/include/idl/pnp.idl +++ b/reactos/include/idl/pnp.idl @@ -49,6 +49,17 @@ interface pnp [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, diff --git a/reactos/include/wine/cfgmgr32.h b/reactos/include/wine/cfgmgr32.h index 857e3fc6940..50dfcb15a1b 100644 --- a/reactos/include/wine/cfgmgr32.h +++ b/reactos/include/wine/cfgmgr32.h @@ -128,6 +128,17 @@ DECL_WINELIB_CFGMGR32_TYPE_AW(DEVINSTID) #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 ); diff --git a/reactos/lib/setupapi/cfgmgr.c b/reactos/lib/setupapi/cfgmgr.c index 0f3464d3e19..a7befef3457 100644 --- a/reactos/lib/setupapi/cfgmgr.c +++ b/reactos/lib/setupapi/cfgmgr.c @@ -1195,9 +1195,34 @@ CONFIGRET WINAPI CM_Get_Device_ID_List_Size_ExA( 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); } diff --git a/reactos/services/umpnpmgr/umpnpmgr.c b/reactos/services/umpnpmgr/umpnpmgr.c index cdeb7a7eb9b..8fecf2e3c78 100644 --- a/reactos/services/umpnpmgr/umpnpmgr.c +++ b/reactos/services/umpnpmgr/umpnpmgr.c @@ -302,6 +302,21 @@ PNP_EnumerateSubKeys(handle_t BindingHandle, } +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, @@ -634,6 +649,22 @@ PNP_GetDeviceRegProp(handle_t BindingHandle, } +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,