[Qt-interest] How to solve the DLL function call problem

Ramesh ramesh.bs at robosoftin.com
Wed Oct 6 14:57:55 CEST 2010


Thanks Thiago,

So one doubt is cleared, I.e function call is synchronous. In DLL function I
am fetching some value from the device, it takes some time to connect and
fetch the value, but in the mean time my application doesn’t wait till it
receives response..
I want my app to wait till It receives response from device.

I don’t know how to solve this problem.

-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Thiago Macieira
Sent: Wednesday, October 06, 2010 6:15 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] How to solve the DLL function call problem

Em Quarta-feira 06 Outubro 2010, às 14:25:02, Ramesh escreveu:
> Hi,
>
> i have couple of query's with respect to DLL,
>
> 1)If i load the DLL in run time, i guess DLL will be in separate
> thread right?

No, that is not correct. Threads and DLLs have nothing to do with each
other.

> 2)If i call a function present in DLL, and that function takes much
> time to return the value then how can i make my application thread to
> wait till the DLL's function return value.

If you call a function, the caller doesn't get control until callee returns.

Therefore your question doesn't make sense.

Either that, or you are doing something more than what you're telling us. As
it stands, the answer is "simply call the function".

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

Qt Developer Days 2010  -  Munich Oct 11-13  -  San Francisco Nov 1-3 For
more information and to register: http://qt.nokia.com/qtdevdays2010


-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.



More information about the Qt-interest-old mailing list