mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 06:30:37 +00:00
Implemented RegQueryMultipleValues.
This commit is contained in:
parent
1af798920c
commit
751c4544b0
@ -201,8 +201,8 @@
|
||||
@ stub RegOpenUserClassesRoot
|
||||
@ stdcall RegQueryInfoKeyA(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) RegQueryInfoKeyA
|
||||
@ stdcall RegQueryInfoKeyW(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) RegQueryInfoKeyW
|
||||
@ stub RegQueryMultipleValuesA
|
||||
@ stub RegQueryMultipleValuesW
|
||||
@ stdcall RegQueryMultipleValuesA(long ptr long ptr ptr) RegQueryMultipleValuesA
|
||||
@ stdcall RegQueryMultipleValuesW(long ptr long ptr ptr) RegQueryMultipleValuesW
|
||||
@ stdcall RegQueryValueA(long str ptr ptr) RegQueryValueA
|
||||
@ stdcall RegQueryValueExA(long str ptr ptr ptr ptr) RegQueryValueExA
|
||||
@ stdcall RegQueryValueExW(long wstr ptr ptr ptr ptr) RegQueryValueExW
|
||||
|
@ -510,6 +510,92 @@ DWORD WINAPI RegQueryInfoKeyW( HKEY hkey, LPWSTR class, LPDWORD class_len, LPDWO
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* RegQueryMultipleValuesA [ADVAPI32.@]
|
||||
*/
|
||||
DWORD WINAPI RegQueryMultipleValuesA(HKEY hkey, PVALENTA val_list, DWORD num_vals,
|
||||
LPSTR lpValueBuf, LPDWORD ldwTotsize)
|
||||
{
|
||||
int i;
|
||||
DWORD maxBytes = *ldwTotsize;
|
||||
HRESULT status;
|
||||
LPSTR bufptr = lpValueBuf;
|
||||
*ldwTotsize = 0;
|
||||
|
||||
TRACE("(%x,%p,%ld,%p,%p=%ld)\n", hkey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize);
|
||||
|
||||
for(i=0; i < num_vals; ++i)
|
||||
{
|
||||
|
||||
val_list[i].ve_valuelen=0;
|
||||
status = RegQueryValueExA(hkey, val_list[i].ve_valuename, NULL, NULL, NULL, &val_list[i].ve_valuelen);
|
||||
if(status != ERROR_SUCCESS)
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
if(lpValueBuf != NULL && *ldwTotsize + val_list[i].ve_valuelen <= maxBytes)
|
||||
{
|
||||
status = RegQueryValueExA(hkey, val_list[i].ve_valuename, NULL, &val_list[i].ve_type,
|
||||
bufptr, &val_list[i].ve_valuelen);
|
||||
if(status != ERROR_SUCCESS)
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
val_list[i].ve_valueptr = (DWORD_PTR)bufptr;
|
||||
|
||||
bufptr += val_list[i].ve_valuelen;
|
||||
}
|
||||
|
||||
*ldwTotsize += val_list[i].ve_valuelen;
|
||||
}
|
||||
return lpValueBuf != NULL && *ldwTotsize <= maxBytes ? ERROR_SUCCESS : ERROR_MORE_DATA;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* RegQueryMultipleValuesW [ADVAPI32.@]
|
||||
*/
|
||||
DWORD WINAPI RegQueryMultipleValuesW(HKEY hkey, PVALENTW val_list, DWORD num_vals,
|
||||
LPWSTR lpValueBuf, LPDWORD ldwTotsize)
|
||||
{
|
||||
int i;
|
||||
DWORD maxBytes = *ldwTotsize;
|
||||
HRESULT status;
|
||||
LPSTR bufptr = (LPSTR)lpValueBuf;
|
||||
*ldwTotsize = 0;
|
||||
|
||||
TRACE("(%x,%p,%ld,%p,%p=%ld)\n", hkey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize);
|
||||
|
||||
for(i=0; i < num_vals; ++i)
|
||||
{
|
||||
val_list[i].ve_valuelen=0;
|
||||
status = RegQueryValueExW(hkey, val_list[i].ve_valuename, NULL, NULL, NULL, &val_list[i].ve_valuelen);
|
||||
if(status != ERROR_SUCCESS)
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
if(lpValueBuf != NULL && *ldwTotsize + val_list[i].ve_valuelen <= maxBytes)
|
||||
{
|
||||
status = RegQueryValueExW(hkey, val_list[i].ve_valuename, NULL, &val_list[i].ve_type,
|
||||
bufptr, &val_list[i].ve_valuelen);
|
||||
if(status != ERROR_SUCCESS)
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
val_list[i].ve_valueptr = (DWORD_PTR)bufptr;
|
||||
|
||||
bufptr += val_list[i].ve_valuelen;
|
||||
}
|
||||
|
||||
*ldwTotsize += val_list[i].ve_valuelen;
|
||||
}
|
||||
return lpValueBuf != NULL && *ldwTotsize <= maxBytes ? ERROR_SUCCESS : ERROR_MORE_DATA;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* RegQueryInfoKeyA [ADVAPI32.@]
|
||||
*/
|
||||
|
@ -87,6 +87,9 @@ DWORD WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,
|
||||
LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
|
||||
LPDWORD,LPFILETIME);
|
||||
#define RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey)
|
||||
DWORD WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
|
||||
DWORD WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
|
||||
#define RegQueryMultipleValues WINELIB_NAME_AW(RegQueryMultipleValues)
|
||||
LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
|
||||
LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
|
||||
#define RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
|
||||
|
Loading…
Reference in New Issue
Block a user