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:
- Implemented DSiDeleteRegistryValue.
- Added parameter 'access' to the DSiKillRegistry.
- [Mitja] Fixed allocation in DSiGetUserName.
- [Mitja] Also catch 'error' output in DSiExecuteAndCapture.
- DSiAddApplicationToFirewallExceptionList renamed to DSiAddApplicationToFirewallExceptionListXP.
- Added DSiAddApplicationToFirewallExceptionListAdvanced which uses Advanced Firewall interface, available on Vista+.
- DSiAddApplicationToFirewallExceptionList now calls either DSiAddApplicationToFirewallExceptionListXP or DSiAddApplicationToFirewallExceptionListAdvanced, depending on OS version.
- Implemented functions to remove application from the firewall exception list: DSiRemoveApplicationFromFirewallExceptionList, DSiRemoveApplicationFromFirewallExceptionListAdvanced, DSiRemoveApplicationFromFirewallExceptionListXP.
The parameter idWindow seems to be incorrectly used in this call (the function takes a pointer):
ReplyDeletefunction 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?
ReplyDeleteDelphi 5... Yes, I know...
ReplyDeleteI 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 :)
ReplyDelete