[advapi32/service #2] Don't rely blindly on type

Rolf Kalbermatter r.kalbermatter at hccnet.nl
Wed Jun 27 14:21:54 CDT 2007


Hi Paul, 

>On Wine, type is unchanged in a failure case for RegQueryValueExW. This
means the
>previous code relied on the returned type of the previous last succeeded
call, huh?

You are right that there is a problem with the existing code at some places.
But changing

-    if( ( r == ERROR_SUCCESS ) || ( type == REG_DWORD ) )
+    if( ( r == ERROR_SUCCESS ) && ( type == REG_DWORD ) )

should be enough. Since the funtion returned with success the type must be
valid now.

Rolf Kalbermatter






More information about the wine-devel mailing list