Katoch
Katoch

Reputation: 2777

Using dll simultaneously from two separate executables

Actually my question is more related to dll.

Both of which can tx/rx data from zanthric USB-2-CAN device using dll directly.

Now is it possible for both AAA_app & xxx_app to directly use same dll for zanthric device & operate simultaneously?

Is it possible for both GUI to load same DLL for communication?

Will it cause some problems will tx & rx of data in two GUI?

Please suggest.

Upvotes: 0

Views: 147

Answers (2)

Israel Unterman
Israel Unterman

Reputation: 13510

That's an important question. I believe it depends on the DLL and the USB driver you activate. I know that a USB DLL/driver that I used made problems when accessed simultaneously even from the same application by 2 threads. I had to synchronize the access using semaphores.

The TCP/IP stack, on the other hand, is intended to work simultaneously with multiple processes. It's a matter of both hardware and the software above it.

Unlike TCP/IP, there is no standatd "USB stack". So it depends on the driver running the USB you use.

Upvotes: 0

JasonD
JasonD

Reputation: 16582

It's entirely possible for multiple processes to use a single DLL - indeed that's generally how things work.

However whether or not it does what you expect, when accessing a hardware resource, it down to how that particular DLL functions. I'd expect at a minimum that there would be some level of access control going on at an API level.

Upvotes: 1

Related Questions