Al Boldi wrote:
I do not know how to do it,
It turns out that you need an export trick to do this.
Include the attached 'LibSyncMgr.inc' into your lib after your exports-line
with this line:
{$i LibSyncMgr.inc}
Make sure there is no LCL or Interfaces unit included in your
melchiorre caruso wrote:
Al Boldi wrote:
I do not know how to do it,
It turns out that you need an export trick to do this.
Include the attached 'LibSyncMgr.inc' into your lib after your
exports-line with this line:
{$i LibSyncMgr.inc}
Make sure there is no LCL or
On Sat, 15 Dec 2007, Al Boldi wrote:
melchiorre caruso wrote:
I found an article that explains why my code does not work on Windows:
Actually, I had a closer look at synchronize, and it turns out to be
dependent on the GUI, which probably means that you need to include
'Interfaces' in
Michael Van Canneyt wrote:
On Sat, 15 Dec 2007, Al Boldi wrote:
melchiorre caruso wrote:
I found an article that explains why my code does not work on Windows:
Actually, I had a closer look at synchronize, and it turns out to be
dependent on the GUI, which probably means that you need
Al Boldi schreef:
Michael Van Canneyt wrote:
On Sat, 15 Dec 2007, Al Boldi wrote:
melchiorre caruso wrote:
I found an article that explains why my code does not work on Windows:
Actually, I had a closer look at synchronize, and it turns out to be
dependent on the GUI, which probably means
Al Boldi wrote:
Michael Van Canneyt wrote:
On Sat, 15 Dec 2007, Al Boldi wrote:
melchiorre caruso wrote:
I found an article that explains why my code does not work on Windows:
Actually, I had a closer look at synchronize, and it turns out to be
dependent on the GUI,
Vincent Snijders wrote:
Al Boldi schreef:
Vincent Snijders wrote:
WakeMainThread is just one way to make sure that the calling thread
calls CheckSynchronize from time to time. Synchronize does not depend
on how the main thread call CheckSynchronize, just that it is
accomplished.
I found an article that explains why my code does not work on Windows:
http://www.clevercomponents.com/articles/article019/delphi6sync.asp
Now it works.
unit threadx;
interface
uses
Windows,
Classes;
type
TThreadSynchronizer = class
private
FMethod: TThreadMethod;
melchiorre caruso wrote:
I found an article that explains why my code does not work on Windows:
Actually, I had a closer look at synchronize, and it turns out to be
dependent on the GUI, which probably means that you need to include
'Interfaces' in your library uses clause. Can you try this
melchiorre caruso wrote:
Al Boldi wrote:
melchiorre caruso wrote:
if I use in execute method the source
if Assigned (FMethod) then
FMethod;
instead of
if Assigned (FMethod) then
Synchronize(FMethod);
the method fMethod is called but not synchronized. Then the
melchiorre caruso wrote:
Al Boldi wrote:
So it's either an fpc or windows issue.
Can you statically link it on windows, and see if it make a difference?
I have statically linked library to application with this results
Library.MainBlock MainThreadID = 3496
Library.MainBlock
Al Boldi wrote:
melchiorre caruso wrote:
Al Boldi wrote:
So it's either an fpc or windows issue.
Can you statically link it on windows, and see if it make a difference?
I have statically linked library to application with this results
Library.MainBlock MainThreadID = 3496
Al Boldi wrote:
melchiorre caruso wrote:
Al Boldi wrote:
So it's either an fpc or windows issue.
Can you statically link it on windows, and see if it make a difference?
I have statically linked library to application with this results
Library.MainBlock MainThreadID = 3496
melchiorre caruso wrote:
Can You send to me the source that runs correctly on linux?
I am using your source.
Thanks!
--
Al
_
To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
archives
melchiorre caruso wrote:
Al Boldi wrote:
melchiorre caruso wrote:
procedure TTestLibrary.TestBtnClick(Sender: TObject);
nbsp; LibHandle := LoadLibrary('thread2lib.dll');
CreateMyThreadFunc := GetProcedureAddress(LibHandle,'CreateMyThread');
Make sure your library actually loads...
Al Boldi wrote:
melchiorre caruso wrote:
procedure TTestLibrary.TestBtnClick(Sender: TObject);
nbsp; LibHandle := LoadLibrary('thread2lib.dll');
CreateMyThreadFunc := GetProcedureAddress(LibHandle,'CreateMyThread');
Make sure your library actually loads...
if I use in execute
melchiorre caruso wrote:
procedure TTestLibrary.TestBtnClick(Sender: TObject);br
beginbr
nbsp; LibHandle := LoadLibrary('thread2lib.dll');br
nbsp; CreateMyThreadFunc := GetProcedureAddress(LibHandle,
'CreateMyThread');br
Make sure your library actually loads...
nbsp; if
melchiorre caruso wrote:
!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
Can you post text only messages?
ttI try to use CheckSyncronize() in the application loop but without
result;br
The function synchronize appears to be broken and, br
the event on-terninate not be called. I
Graeme Geldenhuys wrote:
On 06/12/2007, melchiorre caruso
[EMAIL PROTECTED] wrote:
Hi everybody,
I have a question about to Thread and DLL library.
Is it possible to create a function that has as result
a thread, and insert it into a dll?
The issue is probably cause by the same
Hi everybody,
I have a question about to Thread and DLL library.
Is it possible to create a function that has as result
a thread, and insert it into a dll?
example:
library getthread
...
function CreateMyThread: TThread;
begin
Result := TMyThread.Create;
end;
...
exports CreateMyThread
On 06/12/2007, melchiorre caruso [EMAIL PROTECTED] wrote:
Hi everybody,
I have a question about to Thread and DLL library.
Is it possible to create a function that has as result
a thread, and insert it into a dll?
The issue is probably cause by the same problem I had with threads in
console
21 matches
Mail list logo