Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Synchronize in thread dll


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Nov 28, 2014 3:29 PM Last Post By: Remy Lebeau (Te...
Guest
Synchronize in thread dll
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 27, 2014 3:36 AM
Hi, I need to use the method synchronize in a trhead without enabling the link dinamik With rtl and runtime packages.
When I try to use the method to synchronize from the dll this method is not executed
How I can do this?
Is there an alternative?

Thank you !!
Alex Belo

Posts: 626
Registered: 10/8/06
Re: Synchronize in thread dll  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 27, 2014 4:54 AM   in response to: Guest in response to: Guest
Juan Chiva wrote:

I need to use the method synchronize in a trhead without
enabling the link dinamik With rtl and runtime packages. When I try
to use the method to synchronize from the dll this method is not
executed How I can do this?

Builder 6 Synchronize in DLL
http://www.codenewsfast.com/cnf/article/1823589796/permalink.art-ng1890q358

Another problem using Synchronize in a DLL
http://www.codenewsfast.com/cnf/article/0/permalink.art-ng1890q561

http://edn.embarcadero.com/article/32756

Information is for older versions, I don't know if situation is better
in newer versions.

--
Alex
Guest
Re: Synchronize in thread dll
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 28, 2014 12:32 AM   in response to: Alex Belo in response to: Alex Belo
Hi I tried this code and it works correctly.

bool __export CheckSync()
{
return CheckSynchronize();
}

// a TTimer::OnTimer event handler
void __fastcall TForm1::SyncTimerElapsed(TObject *Sender)
{
CheckSync();
}

The problem is to close the application acces violation error in TResourceManager.FreeResource (Resource: PResource) function occurs;

Alex Belo wrote:
Juan Chiva wrote:

I need to use the method synchronize in a trhead without
enabling the link dinamik With rtl and runtime packages. When I try
to use the method to synchronize from the dll this method is not
executed How I can do this?

Builder 6 Synchronize in DLL
http://www.codenewsfast.com/cnf/article/1823589796/permalink.art-ng1890q358

Another problem using Synchronize in a DLL
http://www.codenewsfast.com/cnf/article/0/permalink.art-ng1890q561

http://edn.embarcadero.com/article/32756

Information is for older versions, I don't know if situation is better
in newer versions.

--
Alex
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Synchronize in thread dll  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 28, 2014 3:29 PM   in response to: Guest in response to: Guest
Juan wrote:

The problem is to close the application acces violation error in
TResourceManager.FreeResource (Resource: PResource) function
occurs;

That implies that you are not managing GDI resources correctly. What does
your thread actually do? Do you have the same error if your thread is not
running? Are you terminating the thread before the app exits?

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02