.\" -*- nroff -*- .\" Generated file - DO NOT EDIT! .TH SHQueryValueExA 3w "Oct 2012" "Wine API" "Wine API" .SH NAME \fBSHQueryValueExA\fR (SHLWAPI.@) .SH SYNOPSIS DWORD SHQueryValueExA ( HKEY \fIhKey\fR, LPCSTR \fIlpszValue\fR, LPDWORD \fIlpReserved\fR, LPDWORD \fIpwType\fR, LPVOID \fIpvData\fR, LPDWORD \fIpcbData\fR ) .SH DESCRIPTION .PP Get a value from the registry, expanding environment variable strings. .SH PARAMS \fIhKey\fR \fB[In]\fR Handle to registry key. .PP \fIlpszValue\fR \fB[In]\fR Name of value to query. .PP \fIlpReserved\fR \fB[Out]\fR Reserved for future use; must be \fBNULL\fR. .PP \fIpwType\fR \fB[Out]\fR Optional pointer updated with the values type. .PP \fIpvData\fR \fB[Out]\fR Optional pointer updated with the values data. .PP \fIpcbData\fR \fB[Out]\fR Optional pointer updated with the values size. .PP .SH RETURNS .PP \fBSuccess:\fR \fBERROR_SUCCESS\fR. Any non \fBNULL\fR output parameters are updated with information about the value. .PP \fBFailure:\fR \fBERROR_OUTOFMEMORY\fR if memory allocation fails, or the type of the data is \fBREG_EXPAND_SZ\fR and \fIpcbData\fR is \fBNULL\fR. Otherwise an error code from \fBRegQueryValueExA(3w)\fR or \fBExpandEnvironmentStringsA(3w)\fR. .SH NOTES .PP Either \fIpwType\fR, \fIpvData\fR or \fIpcbData\fR may be \fBNULL\fR if the caller doesn't want the type, data or size information for the value. .PP If the type of the data is \fBREG_EXPAND_SZ\fR, it is expanded to \fBREG_SZ\fR. The value returned will be truncated if it is of type \fBREG_SZ\fR and bigger than the buffer given to store it. .PP REG_EXPAND_SZ: case-1: the unexpanded string is smaller than the expanded one subcase-1: the buffer is too small to hold the unexpanded string: function fails and returns the size of the unexpanded string. .PP subcase-2: buffer is too small to hold the expanded string: the function return success (!!) and the result is truncated *** This is clearly an error in the native implementation. ***. .PP case-2: the unexpanded string is bigger than the expanded one The buffer must have enough space to hold the unexpanded string even if the result is smaller. .SH IMPLEMENTATION .PP Declared in \fB"shlwapi.h"\fR. .PP Implemented in \fB"dlls/shlwapi/reg.c"\fR. .PP Debug channel \fB"shell"\fR.