DsiWin31 1.53a
This release fixes nasty bug (introduced in release 1.51) which caused various TDSiRegistry function (and other DSi code using those functions) to fail on Delphi 2009/2010. Other changes:
Labels: Delphi, open source |
random ramblings on Delphi, programming, Delphi programming, and all the rest
This release fixes nasty bug (introduced in release 1.51) which caused various TDSiRegistry function (and other DSi code using those functions) to fail on Delphi 2009/2010. Other changes:
Labels: Delphi, open source |
4 Comments:
The parameter idWindow seems to be incorrectly used in this call (the function takes a pointer):
function DSiSendWMCloseToWindow(hWindow: THandle; lParam: integer): BOOL; stdcall;
var
idWindow: DWORD;
begin
// BAD: GetWindowThreadProcessId(hWindow, idWindow);
// should be:
GetWindowThreadProcessId(hWindow, @idWindow);
if idWindow = DWORD(lParam) then
PostMessage(hWindow, WM_CLOSE, 0, 0);
Result := true;
end; { DSiSendWMCloseToWindow }
BTW, great library!
Delphi 2007 has two overloads of GetWindowThreadProcessId - one taking pointer and another 'var' parameter. Which Delphi are you using?
Delphi 5... Yes, I know...
I didn't know about the overload, but thanks for the heads up. Note that the other calls to that same function in this unit use the pointer version of the overload.
New version uploaded. I have no problems maintaining compatibility with older Delphis - I just wanted to know what to put in the changelog :)
Post a Comment
Links to this post:
Create a Link
<< Home