You are not logged in.
Pages: 1
I am currently creating a unit test for the TSQLRestClientURIMessage and found that the window handle created does not get destroyed/closed.
this causes in the unit test as creatring a new named window handle fails because of the pre-existing named window handle.
I suggest following change in SYnCOmmons.pas:
A patch is required to ensure the client window handle is remembered even when the server window is not found:
constructor TSQLRestClientURIMessage.Create(aModel: TSQLModel;
const ServerWindowName: string; ClientWindow: HWND; TimeOutMS: cardinal);
begin
inherited Create(aModel);
fClientWindow := ClientWindow; // HHPatch moved to top
fServerWindow := FindWindow(pointer(ServerWindowName),nil);
if fServerWindow=0 then
raise ECommunicationException.CreateFmt('No "%s" window available - server may be down',
[ServerWindowName]);
// fClientWindow := ClientWindow; // HHPatch Moved to top
fTimeOutMS := TimeOutMS;
end;
Last edited by h.hasenack (2012-09-26 09:32:24)
Offline
Fix potential GDI handle resource leak in TSQLRestClientURIMessage.Create has been applied.
See http://synopse.info/fossil/info/7b99e0bee1
Thanks for the report.
Offline
Pages: 1