API Support Forum
User Profile

Viewing User Profile for: PPietro


About

Jul 21, 2009 12:00 AM

Aug 25, 2009 09:50 AM

Sep 22, 2009 09:34 AM



Post Statistics
PPietro has contributed to 3 posts out of 5593 total posts (0.05%) in 5398 days (0.00 posts per day).

20 most recent posts:

API Support » The same event into different threads and usage of client in MDI applications Aug 19, 2009 @ 11:26 AM (Total replies: 2)

Thanks for your fast replay, Sergek,
now we are changing our way and we
will let you soon.

Best Regards

Pietro Fucci

API Support » The same event into different threads and usage of client in MDI applications Aug 19, 2009 @ 11:07 AM (Total replies: 2)

Hi there,

We are making our software using:
- OECAPICOM v. 3.4.0
- Delphi language
- MDI-form application

What we are doing:
- Every time our software creates a
new module, it loads on it a DLL
which one we pass market name and
Time frame as parameters;

- inside of the DLL, in order to
optimise the code, we use some
threads how many are the values we
want to get from the client: e.g.:
Lastprice, Working orders, etc.

-in one of these threads we manage OnPriceChange
event.

- into DLL we have a private variable
TOECClient type; at OnShow we put the
follow code:

"ourvariableTOECClient" := OECClient
(OECClient is defined into the Host)

....
....

After then, we create the thread to
manage the price-change, putting into
the thread the client as we made from host
to DLL.


All works fine...
but... when we open a second form, which creates
a new istance of the same DLL, that happens:

- the last DLL works and the first one
stop to receive the values.

So then our questions are:

1. Is it correct how we drive the client
from one DLL to another?

2. If yes, where we are wrong?

3. Does It exist a better way to manage
contracts in different instances of the same DLL?

4. We have notice that when two threads are working and
in all of them there's the same event... only one works (the last one...),
the first one is stopped... WHY ?

Best Regards

Pietro Fucci