WindowLong Problems On Setup Exit

InstallationWay

Новичок
Hi
I use several plugins and modules within my setup, such as WinTB, botva2, progressBar, Trackbar.
They will use SetWindowLong and I should release them in the correct situation. But sometimes I do not know where to release and so on ... So the setup will delay on Exit and will close with an error in the debugger (most with 0xc000041d exit code).

How to trace the problem and release the WindowLong? any idea or similar Experience?
 

Nemko

Дилетант
Модератор
InstallationWay, you need to manually release all processes, but there are too many items in the CheckListBox example, it's simpler:
Код:
procedure DeinitializeSetup;
begin
  gdipShutdown;
  WizardForm.Free;//this
end;
 

InstallationWay

Новичок
InstallationWay , you need to manually release all processes, but there are too many items in the CheckListBox example, it's simpler:
Код:
 procedure DeinitializeSetup;
begin
  gdipShutdown;
  WizardForm.Free; // this
end;
I also tried WizardForm.Free, but the exit code is 0xC000041D. I found it somewhere "0xC000041D: An unhandled exception was encountered during a user callback."
I seem there are some callbacks waiting or something similar. Is there any way to destroy them all?
 

InstallationWay

Новичок
When I try to add a different progress bar to my setup, this problem will appear. I have attached the sample progress bar, it itself does not have any problem, but when I add it to my setup the delayed exit problem will appear. Even If I do not start installing (I mean before showing the progress bar) if I use this progress bar in my code the problem is there! and If I comment on the codes it will be fine again.

My setup project is something like this: https://krinkels.org/threads/one-page-installer-using-botva.4334/post-37756

I have attached the progress bar:
 

Вложения

InstallationWay

Новичок
InstallationWay , you need to manually release all processes, but there are too many items in the CheckListBox example, it's simpler:
Код:
 procedure DeinitializeSetup;
begin
  gdipShutdown;
  WizardForm.Free; // this
end;
OK, I have solved my problem with WizardForm.Free; but I used it before gdipShutdown ;. I also disable AllCancel method from my previous reply's sample.
Solving this problem was with the WizardForm.Free hint and commenting sus Codes. I was looking for an exact and clean way to understand and find the exact point of the problem which a handle is not free. But it seems it is not possible with so many testing and checking all controls and plugins :)

Thank You All Brothers
 
Сверху