PDA

Click to See Complete Forum and Search --> : Multiple clients accessing DLL


khughes
Sep 17th, 2002, 05:07 AM
I am developing an ActiveX DLL that will have a number of clients accessing it.
Problem is I keeping getting an error abut cannot execute a synchronous function as the component is currently doing an asynchronous function...

How do I ensure that 2 clients do not call the function at the same time - or how do I code it to allow this....

The DLL holds a collection of 'status' which the clients update - should I be looking at updating via udp/tcp/MSMQ etc ??

Thanks .. Ken

deja
Sep 18th, 2002, 12:15 AM
hi,
i can realize from your question that u r looking for some multithread component?
if so, u can't create MTA COM objcet in vb.
but, if u want (and i'm not sure that it will be a good solution) u can use ActiveX EXE instead.
maybe if u give us more info, we could help u.

khughes
Sep 18th, 2002, 03:44 AM
Thanks Deja

the clients are ActiveX EXE's and they're accessing the Status componenet (collection) which is a ActiveX DLL

Basically main code creates / spawns all the client ActiveX EXE's and also creates an ActiceX DLL (the status collection). As the clients complete tasks they update the ActiveX DLL status collection...

Does this help - any more ideas ???

deja
Sep 18th, 2002, 08:08 AM
i still don't realized what u trying to do but, your clients is ActiveX EXE ?
tell me more about your application.

khughes
Sep 18th, 2002, 11:09 AM
they're not clients as such - more like child processes.
The main app - ctreates a number of these child apps using COM/DCOM on various servers (they need no human interaction)

The clients / child processes monitor various activities. Then every so often they update the status collection - which is an ActiveX DLL

.. Ken

deja
Sep 19th, 2002, 02:30 AM
i don't know what do you mean "child", but never mind.
if u have many processes (childs) that each of them create COM object (DLL), then each one have it's own copy of that DLL.
so, i can't figure out why do you have this problem of concurrency.
concurrency problem can only be in COM object that reside in MTA, and this kind of object doesn't exist in VB.
or maybe i didn't understand your question.