VB6 to c# Compatibility problems - Microsoft.VisualBasic.Compatibility.dll and stdole
Posted on 2005-04-11
We have an odd situation with c# code that uses a call to Microsoft.VisualBasic.Compatibility.VB6
We have got an SDK from a vendor and we are trying to convert a stdole.IPictureDisp object to a System.Drawing.Image.
They do this using this code.
pictureBox1.Image = Microsoft.VisualBasic.Compatibility.VB6.Support.IPictureDispToImage(pic.Picture);
where pic.Picture is a stdole.IPictureDisp object.
This code works perfectly fine on my pc and others that have Visual Studio installed but wont run on the pc that only have the framework installed.
It throws an error saying that it couldnt find stdole or one of its dependencies.
So we had a look and compared a PC with Visual studio and one without and they both had stdole files in the same place.
We noticed that C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Microsoft.VisualBasic.Compatibility.dll was missing from the PC without Visual Studio
so we copied that over as well.
However it doesnt seem to affect it.
Does anybody have any ideas what we could be missing. We cant work out the dependancies of stdole to fix it.