Commit 751c4544 authored by Dominik Strasser's avatar Dominik Strasser Committed by Alexandre Julliard

Implemented RegQueryMultipleValues.

parent 1af79892
...@@ -201,8 +201,8 @@ ...@@ -201,8 +201,8 @@
@ stub RegOpenUserClassesRoot @ stub RegOpenUserClassesRoot
@ stdcall RegQueryInfoKeyA(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) RegQueryInfoKeyA @ 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 @ stdcall RegQueryInfoKeyW(long ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) RegQueryInfoKeyW
@ stub RegQueryMultipleValuesA @ stdcall RegQueryMultipleValuesA(long ptr long ptr ptr) RegQueryMultipleValuesA
@ stub RegQueryMultipleValuesW @ stdcall RegQueryMultipleValuesW(long ptr long ptr ptr) RegQueryMultipleValuesW
@ stdcall RegQueryValueA(long str ptr ptr) RegQueryValueA @ stdcall RegQueryValueA(long str ptr ptr) RegQueryValueA
@ stdcall RegQueryValueExA(long str ptr ptr ptr ptr) RegQueryValueExA @ stdcall RegQueryValueExA(long str ptr ptr ptr ptr) RegQueryValueExA
@ stdcall RegQueryValueExW(long wstr ptr ptr ptr ptr) RegQueryValueExW @ stdcall RegQueryValueExW(long wstr ptr ptr ptr ptr) RegQueryValueExW
......
...@@ -511,6 +511,92 @@ DWORD WINAPI RegQueryInfoKeyW( HKEY hkey, LPWSTR class, LPDWORD class_len, LPDWO ...@@ -511,6 +511,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.@] * RegQueryInfoKeyA [ADVAPI32.@]
*/ */
DWORD WINAPI RegQueryInfoKeyA( HKEY hkey, LPSTR class, LPDWORD class_len, LPDWORD reserved, DWORD WINAPI RegQueryInfoKeyA( HKEY hkey, LPSTR class, LPDWORD class_len, LPDWORD reserved,
......
...@@ -87,6 +87,9 @@ DWORD WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD, ...@@ -87,6 +87,9 @@ DWORD WINAPI RegQueryInfoKeyA(HKEY,LPSTR,LPDWORD,LPDWORD,LPDWORD,
LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD, LPDWORD,LPDWORD,LPDWORD,LPDWORD,LPDWORD,
LPDWORD,LPFILETIME); LPDWORD,LPFILETIME);
#define RegQueryInfoKey WINELIB_NAME_AW(RegQueryInfoKey) #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 RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR); LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
#define RegReplaceKey WINELIB_NAME_AW(RegReplaceKey) #define RegReplaceKey WINELIB_NAME_AW(RegReplaceKey)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment