470,594 Members | 1,523 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,594 developers. It's quick & easy.

COM StdPicture-to-Image conversion and Bizarre GAC behavior

We're authoring a VS 2005 app that includes several EXE's and DLL's and also
uses a COM component (a customer requirement). The COM component provides a
graphic image to be used by the .NET app; the graphic is supplied as a
"StdPicture" (AKA, IPictureDisp). The only way I have found to convert this
to a .NET Image is:

Microsoft.VisualBasic.Compatibility.VB6.IPictureDi spToImage

Is that the only way to accomplish this conversion? How would a C# app do

OK, so I build my app and want to try an installation on a clean test
machine (XP SP2). I install the v2.0 framework, copy all relevant files to a
target folder (including the Interop wrapper DLLs VS creates for the COM
libraries), and register the COM components. The app runs OK, until it tries
to generate the graphics (from the COM server). The following error occurs:

"Could not load file or assembly 'stdole, Version=7.0.3300.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The system cannot find the file specified."

Hmm, I open Windows Explorer on the test machine, navigate to
C:\Windows\assembly, and I get the "special view" of the GAC that Explorer
provides. Like the error message says, stdole is not there. So, still
working on the test PC, I navigate in Explorer to my dev machine across the
LAN (via "My Network Places"). I go to C:\Windows\assembly on my dev
machine, and I'm shocked to see that stdole is not there either - how the
heck is this working on my dev machine?

So I walk over to my dev machine, open Windows Explorer and navigate to
C:\Windows\assembly, and darn it - stdole.dll IS THERE. What the ?????

OK, still in Windows Explorer at my dev machine, I navigate across the LAN
to the test machine, and look in its GAC, and guess what - stdole.dll IS

Just as I start to doubt my sanity, I look more closely at what else is
there - checking the title bar and confirming that I am in fact pointed to
the GAC of the test machine, not the local folder. I see entries for
software that is NOT installed on the test machine - components that are
only installed on my local dev machine.

Conclusion - somehow Windows Explorer is always showing the contents of the
local GAC, regardless of the folder to which you have navigated. Perhaps its
a side effect of the "special view" of the GAC the Explorer provides, but it
sure is bizarre. Anyone else ever see this behavior ??

So, I guess I should be installing stdole.dll as part of the app's setup
kit, but I imagine it does not necessarily have to go in the GAC.

Any comments or suggestions would be welcomed and appreciated.

~ This space intentionally left blank ~
Apr 28 '06 #1
0 1809

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.