[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    RE: [advapi32/service #2] Don't rely blindly on type
From:       "Rolf Kalbermatter" <r.kalbermatter () hccnet ! nl>
Date:       2007-06-27 19:21:54
Message-ID: 000c01c7b8f0$6c4f0bd0$4001a8c0 () glis
[Download RAW message or body]

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





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic