mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
- Implement CM_Enumerate_Enumerators[_Ex]A/W
- Fix PNP_EnumerateSubKeys svn path=/trunk/; revision=17785
This commit is contained in:
parent
9162d35b10
commit
f913bdb378
5 changed files with 100 additions and 13 deletions
|
@ -39,6 +39,8 @@ interface pnp
|
||||||
[in] DWORD Length,
|
[in] DWORD Length,
|
||||||
[in] DWORD Flags);
|
[in] DWORD Flags);
|
||||||
|
|
||||||
|
cpp_quote("#define PNP_BRANCH_ENUM 1")
|
||||||
|
cpp_quote("#define PNP_BRANCH_CLASS 2")
|
||||||
CONFIGRET PNP_EnumerateSubKeys(handle_t BindingHandle,
|
CONFIGRET PNP_EnumerateSubKeys(handle_t BindingHandle,
|
||||||
[in] unsigned long Branch,
|
[in] unsigned long Branch,
|
||||||
[in] unsigned long Index,
|
[in] unsigned long Index,
|
||||||
|
|
|
@ -137,6 +137,12 @@ CONFIGRET WINAPI CM_Delete_Class_Key_Ex( LPGUID, ULONG, HANDLE );
|
||||||
CONFIGRET WINAPI CM_Disconnect_Machine( HMACHINE );
|
CONFIGRET WINAPI CM_Disconnect_Machine( HMACHINE );
|
||||||
CONFIGRET WINAPI CM_Enumerate_Classes( ULONG, LPGUID, ULONG );
|
CONFIGRET WINAPI CM_Enumerate_Classes( ULONG, LPGUID, ULONG );
|
||||||
CONFIGRET WINAPI CM_Enumerate_Classes_Ex( ULONG, LPGUID, ULONG, HMACHINE );
|
CONFIGRET WINAPI CM_Enumerate_Classes_Ex( ULONG, LPGUID, ULONG, HMACHINE );
|
||||||
|
CONFIGRET WINAPI CM_Enumerate_EnumeratorsA( ULONG, PCHAR, PULONG, ULONG );
|
||||||
|
CONFIGRET WINAPI CM_Enumerate_EnumeratorsW( ULONG, PWCHAR, PULONG, ULONG );
|
||||||
|
#define CM_Enumerate_Enumerators WINELIB_NAME_AW(CM_Enumerate_Enumerators)
|
||||||
|
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_Get_Child( PDEVINST, DEVINST, ULONG );
|
CONFIGRET WINAPI CM_Get_Child( PDEVINST, DEVINST, ULONG );
|
||||||
CONFIGRET WINAPI CM_Get_Child_Ex( PDEVINST, DEVINST, ULONG, HMACHINE );
|
CONFIGRET WINAPI CM_Get_Child_Ex( PDEVINST, DEVINST, ULONG, HMACHINE );
|
||||||
CONFIGRET WINAPI CM_Get_Class_Key_NameA( LPGUID, LPSTR, PULONG, ULONG );
|
CONFIGRET WINAPI CM_Get_Class_Key_NameA( LPGUID, LPSTR, PULONG, ULONG );
|
||||||
|
|
|
@ -313,6 +313,85 @@ CONFIGRET WINAPI CM_Enumerate_Classes_Ex(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CM_Enumerate_EnumeratorsA [SETUPAPI.@]
|
||||||
|
*/
|
||||||
|
CONFIGRET WINAPI CM_Enumerate_EnumeratorsA(
|
||||||
|
ULONG ulEnumIndex, PCHAR Buffer, PULONG pulLength, ULONG ulFlags)
|
||||||
|
{
|
||||||
|
TRACE("%lu %p %p %lx\n", ulEnumIndex, Buffer, pulLength, ulFlags);
|
||||||
|
return CM_Enumerate_Enumerators_ExA(ulEnumIndex, Buffer, pulLength,
|
||||||
|
ulFlags, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CM_Enumerate_EnumeratorsW [SETUPAPI.@]
|
||||||
|
*/
|
||||||
|
CONFIGRET WINAPI CM_Enumerate_EnumeratorsW(
|
||||||
|
ULONG ulEnumIndex, PWCHAR Buffer, PULONG pulLength, ULONG ulFlags)
|
||||||
|
{
|
||||||
|
TRACE("%lu %p %p %lx\n", ulEnumIndex, Buffer, pulLength, ulFlags);
|
||||||
|
return CM_Enumerate_Enumerators_ExW(ulEnumIndex, Buffer, pulLength,
|
||||||
|
ulFlags, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CM_Enumerate_Enumerators_ExA [SETUPAPI.@]
|
||||||
|
*/
|
||||||
|
CONFIGRET WINAPI CM_Enumerate_Enumerators_ExA(
|
||||||
|
ULONG ulEnumIndex, PCHAR Buffer, PULONG pulLength, ULONG ulFlags,
|
||||||
|
HMACHINE hMachine)
|
||||||
|
{
|
||||||
|
FIXME("%lu %p %p %lx %lx\n", ulEnumIndex, Buffer, pulLength, ulFlags,
|
||||||
|
hMachine);
|
||||||
|
return CR_CALL_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CM_Enumerate_Enumerators_ExW [SETUPAPI.@]
|
||||||
|
*/
|
||||||
|
CONFIGRET WINAPI CM_Enumerate_Enumerators_ExW(
|
||||||
|
ULONG ulEnumIndex, PWCHAR Buffer, PULONG pulLength, ULONG ulFlags,
|
||||||
|
HMACHINE hMachine)
|
||||||
|
{
|
||||||
|
RPC_BINDING_HANDLE BindingHandle = NULL;
|
||||||
|
|
||||||
|
FIXME("%lu %p %p %lx %lx\n", ulEnumIndex, Buffer, pulLength, ulFlags,
|
||||||
|
hMachine);
|
||||||
|
|
||||||
|
if (Buffer == NULL || pulLength == NULL)
|
||||||
|
return CR_INVALID_POINTER;
|
||||||
|
|
||||||
|
if (ulFlags != 0)
|
||||||
|
return CR_INVALID_FLAG;
|
||||||
|
|
||||||
|
Buffer[0] = (WCHAR)0;
|
||||||
|
|
||||||
|
if (hMachine != NULL)
|
||||||
|
{
|
||||||
|
BindingHandle = ((PMACHINE_INFO)hMachine)->BindingHandle;
|
||||||
|
if (BindingHandle == NULL)
|
||||||
|
return CR_FAILURE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!PnpGetLocalHandles(&BindingHandle, NULL))
|
||||||
|
return CR_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return PNP_EnumerateSubKeys(BindingHandle,
|
||||||
|
PNP_BRANCH_ENUM,
|
||||||
|
ulEnumIndex,
|
||||||
|
Buffer,
|
||||||
|
*pulLength,
|
||||||
|
pulLength,
|
||||||
|
ulFlags);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CM_Get_Child [SETUPAPI.@]
|
* CM_Get_Child [SETUPAPI.@]
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -40,10 +40,10 @@
|
||||||
@ stub CM_Enable_DevNode_Ex
|
@ stub CM_Enable_DevNode_Ex
|
||||||
@ stdcall CM_Enumerate_Classes(long ptr long)
|
@ stdcall CM_Enumerate_Classes(long ptr long)
|
||||||
@ stdcall CM_Enumerate_Classes_Ex(long ptr long ptr)
|
@ stdcall CM_Enumerate_Classes_Ex(long ptr long ptr)
|
||||||
@ stub CM_Enumerate_EnumeratorsA
|
@ stdcall CM_Enumerate_EnumeratorsA(long str ptr long)
|
||||||
@ stub CM_Enumerate_EnumeratorsW
|
@ stdcall CM_Enumerate_EnumeratorsW(long wstr ptr long)
|
||||||
@ stub CM_Enumerate_Enumerators_ExA
|
@ stdcall CM_Enumerate_Enumerators_ExA(long str ptr long long)
|
||||||
@ stub CM_Enumerate_Enumerators_ExW
|
@ stdcall CM_Enumerate_Enumerators_ExW(long wstr ptr long long)
|
||||||
@ stub CM_Find_Range
|
@ stub CM_Find_Range
|
||||||
@ stub CM_First_Range
|
@ stub CM_First_Range
|
||||||
@ stub CM_Free_Log_Conf
|
@ stub CM_Free_Log_Conf
|
||||||
|
|
|
@ -262,15 +262,15 @@ PNP_EnumerateSubKeys(handle_t BindingHandle,
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
DWORD dwError;
|
DWORD dwError;
|
||||||
|
|
||||||
DPRINT1("PNP_EnumerateSubKeys() called\n");
|
DPRINT("PNP_EnumerateSubKeys() called\n");
|
||||||
|
|
||||||
switch (Branch)
|
switch (Branch)
|
||||||
{
|
{
|
||||||
case 1:
|
case PNP_BRANCH_ENUM:
|
||||||
hKey = hEnumKey;
|
hKey = hEnumKey;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case PNP_BRANCH_CLASS:
|
||||||
hKey = hClassKey;
|
hKey = hClassKey;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -289,14 +289,14 @@ PNP_EnumerateSubKeys(handle_t BindingHandle,
|
||||||
NULL);
|
NULL);
|
||||||
if (dwError != ERROR_SUCCESS)
|
if (dwError != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
ret = CR_FAILURE;
|
ret = (dwError == ERROR_NO_MORE_ITEMS) ? CR_NO_SUCH_VALUE : CR_FAILURE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*RequiredLength++;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT1("PNP_EnumerateSubKeys() done (returns %lx)\n", ret);
|
DPRINT("PNP_EnumerateSubKeys() done (returns %lx)\n", ret);
|
||||||
if (ret == CR_SUCCESS)
|
|
||||||
{
|
|
||||||
DPRINT1("Sub key: %S\n", Buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue