Felipe Villarroel wrote:
Hello list!,
i have two questions that i hope that someone of you could answer.
The first one:
- Should RegOpenKeyExW() do a SetLastError() or it just return an
error code?
I ask this because in the timedate control panel applet,
GetSyncSetting() reads a key from the registry using that function
and if it fails it calls the function GetError() that calls
FormatMessage() using GetLastError() as an argument. For some
reason in my computer this call fails and i receive an window
that says "ERROR_INVALID_WINDOW_HANDLE" that obviously is not
the right error code.
Yeah, that's wrong. FormatMessage should use the return value from
RegOpenKeyEx.
- Modify the GetError() function in the timedate
control panel
applet
I have many fixes and more code for this in my working copy. I was
originally working in NTP
functionality but left it. I hadn't realised part of my code was in
trunk. It must of got caught up
when we rearranged the tree layout.
I'll get back onto NTP soon and finish it off.
Ged.