tags:

views:

6827

answers:

3

We have a large C# (.net 2.0) app which uses our own C++ COM component and a 3rd party fingerprint scanner library also accessed via COM. We ran into an issue where in production some events from the fingerprint library do not get fired into the C# app, although events from our own C++ COM component fired and were received just fine.

Using MSINFO32 to compare the loaded modules on a working system to those on a failing system we determined that this was caused by STDOLE.DLL not being in the GAC and hence not loaded into the faulty process.

Dragging this file into the GAC caused events to come back fine from the fingerprint COM library.

So what does stdole.dll do? It's 16k in size so it can't be much... is it some sort of link to another library like STDOLE32? How come its absence causes such odd behavior?

How do we distribute stdole.dll? This is an XCOPY deploy app and we don't use the GAC. Should we package it as a resource and use the System.EnterpriseServices.Internal.Publish.GacInstall to ensure it's in the GAC?

+6  A: 

It seems that stdole.dll is a primary interop assembly. See Office 2003 Primary Interop Assemblies on MSDN.

artur02
Yes I found a copy in the PIA directory as well. Our app doesn't use office components; and this still doesn't explain the behavior we are seeing!
It may use a "standard" COM interface like IFont or IDispatch. Seems support for these interfaces in .NET need to ref stdole.dll. I'm confused why the heck this assembly is tied to Office.
Aardvark
A: 

I had to also add a reference to my project for stdole. Even though I don't have any references to it (it's a simple image app), 2 of our users were getting errors that it was missing. It could be that they were only running .net 2.0 when this is a 3.5 app. I have figured out why.

I also went in to publish on the project properties tab, and selected Application Files, then included the stdole to be deployed. Hopefully that will work.

Mike
A: 

I had the same problem. I just deleted the reference from the application and recompiled. Ran all the tests which passed. Then redeployed without the dll and it all worked.

I dont know how a reference to this got in the project in the first place. It is a legacy app so must have been a long time ago.

Simon

Simon