Recent

Author Topic: [SOLVED] Problem with threads in DLL  (Read 3195 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1048
[SOLVED] Problem with threads in DLL
« on: July 18, 2010, 01:52:10 am »
Hi,

I have a strange problem with threads in DLLs. I am writing plug-in for IM. Specifications:
1. Messenger is written in Delphi 2010 (32 bit)
2. Is installed on Windows 7 64-bit
3. I must compile plug-in into Windows 7 32 bit, because messenger is not able to load 64 bit libraries.

Problem:
1. From the IM, I'm opening the main form included in the plug (LCL Form).
2. I run a test thread from button in this form
Code: [Select]
procedure TTestThread.Execute;
var
  s: string;
begin
  s := 'test';
end;
3. Messenger quits without any error, process just disappears

My tests:
1. The same plugin (32 bit) called with test exe applications written in Lazarus (32-bit) working properly on win32 and win64
2. The same plugin (32 bit) running in IM installed on Windows 7 32-bit working properly. The problem is only on 64-bit version of Windows. Procedure Execute is not called;

Someone had a similar problem? I'm stuck.

Regards

Lazarus 0.9.29 from svn, 2010-07-07, Revision 26494, Windows 7 32 bit (running on virtualbox)
« Last Edit: July 19, 2010, 06:06:43 pm by Dibo »

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: Problem with threads in DLL
« Reply #1 on: July 19, 2010, 06:06:16 pm »
Problem solved. I had FPC version 2.4.3. I did not know that this is unstable version. On 2.4.0 threads run without any problem.

 

TinyPortal © 2005-2018