I am using a com object that was created using vb 6. It returns an IPictureDisp object. I need to get the Image from that object. I cannot just use the Microsoft.VisualBasic.Compatibility runtime because in the Visual Studio 2003 it is not allowed to be added as a reference.
I found that if I inherit the System.Windows.Forms.AxHost class, then I can have access to these two functions.
mybase.GetIPictureDispFromImage(image as Image)as Object and
mybase.GetPictureFromIPictureDisp(image as Object)as Image.
I can get/use the GetIPictureDispFromImage just fine, but when I try to use the GetPictureFromIPictureDisp, all I get is an error. the message is : Run-time exception thrown : System.Runtime.InteropServices.COMException - Unknown name.
If you can help me find what is causing this error or another way to get the image from the IPictureDisp without using the above mentioned reference, It would be greatly appreciated.!!!!!!!
I found that if I inherit the System.Windows.Forms.AxHost class, then I can have access to these two functions.
mybase.GetIPictureDispFromImage(image as Image)as Object and
mybase.GetPictureFromIPictureDisp(image as Object)as Image.
I can get/use the GetIPictureDispFromImage just fine, but when I try to use the GetPictureFromIPictureDisp, all I get is an error. the message is : Run-time exception thrown : System.Runtime.InteropServices.COMException - Unknown name.
If you can help me find what is causing this error or another way to get the image from the IPictureDisp without using the above mentioned reference, It would be greatly appreciated.!!!!!!!