PDA

View Full Version : several processes loading same dll


JasonSmith
04 Jan 08, 13:24
Hi

I was wondering if anyone can help me on this one.

I have an ActiveX Dll that I am referencing in an application written using visual basic. What I would like to do is run several processes at the same time but the first line of code that gets executed is instantiating the activex control or loading the dll into memory,

try
Dim cl as new CutLogic
catch
MsgBox(ex.message)

(CutLogic is the name of the dll)

The machine that i'm using is a dual core and I'm wondering if somehow there is a race condition occurring when I run the processes one after the other having that line of code to execute first. I'm getting an annoying error that i'm just unable to fathom out why it is occurring, error is (Unable to retrieve COM library for CLSID {9845-093-0930-099} error: 80000004) and the 80000004 means no such interface supported which does not make sense to me, is there some kind of limitation that i'm not aware of? Strange that if i set the processor affinity to zero, so that only one processor is getting used then this error does not show up. If anyone can provide some insight in this I would be really grateful.

AndyMiller
04 Jan 08, 14:27
:confused:

usmarinesgt2171
04 Jan 08, 14:42
Ah, Auf Englisch Bitte!

madslasher
04 Jan 08, 14:42
UMMMMmmm,
LEFT Dual Core CPU/RIGHT Right Dual Core CPU FAILURE
— (CDS2).
An Dual Core CPU failure will be evidenced when LEFT Dual Core CPU
FAIL or RIGHT Dual Core CPU FAIL displays on the unaffected
MFD. An automatic reset function provides a built-in
reset in the event of an Dual Core CPU failure. If an Dual Core CPU failure
occurs without an automatic reset, perform the
following:
1. Dual Core CPU L/R circuit breaker — Out.
2. Dual Core CPU L/R circuit breaker — In. Check MFD
for Dual Core CPU caution message.
If Dual core CPU is not recovered:
3. Delete DLL file AS SOON AS POSSIBLE.
:geek:

doubletap57
04 Jan 08, 14:52
ah multi core issues, dll's are processor specific if there is a split in threads the pipe will show as closed, this occurs mostly with required dll's for programs. i overcome this by running multiple instances of visual studio at the same time allows me to load independently. learned that trick earlier this year, it is call specific. do you have HT turned on? are you in a 64bit interface and what is your api?

JasonSmith
05 Jan 08, 02:03
I'm just trying to figure out if the dual core is really causing the issue, I don't have HT turned on, I know that there is a section of code in a dll that gets called by every process, it increments or decrements a number to indicate how many processes have called the dll and does some mapping to the process address space. Is there some kind of synchronization in the dll that only lets one thread execute that part of entry code in the dll at a time so that no other process will mess things up. I could try and start each process only when that control has been instantiated which would probably solve it but what if say two processes finished at the same time, what would happen then?

Grog
05 Jan 08, 07:11
Hey! It's all ball bearings nowadays. Now you prepare that Fetzer valve with some 3-in-1 oil and some gauze pads. And I'm gonna need 'bout ten quarts of anti-freeze, preferably Prestone. No, no make that Quaker State.

doubletap57
05 Jan 08, 09:34
process can run in the background for an indefinite amount of time that is why you have to close process's in the code or else it keeps running but with some dll's you have to have them running all the time. most dll's are set to run until they are cancelled.

Craiger
05 Jan 08, 12:25
Hey! It's all ball bearings nowadays. Now you prepare that Fetzer valve with some 3-in-1 oil and some gauze pads. And I'm gonna need 'bout ten quarts of anti-freeze, preferably Prestone. No, no make that Quaker State.

:rofl::rofl::rofl: