I have series of object-oriented wrappers in .net code for image specific functionality in GdPicture. My image wrapper maintains the handle returned when a new image is opened by GdPicture and does all of its work on that handle. This is all contained in a .net dll that exposes itself to com.
In my vb6 app, I am using the aforementioned wrapper to open/manipulate an image, which then passes its handle to a GdViewer to display to the user. When I try to display the image I get a return value of Invalid Parameter.
Code: Select all
gdcPhoto.DisplayFromGdPictureImage(pclsCurrImage.handle)
As an alternative I tried getting a HBitmap for the image in question and displaying it using DisplayFromHBitmap, which generates "Class does not support Automation or does not support expected interface."
Code: Select all
Dim lngBitmapPtr As Long
lngBitmapPtr = pclsCurrImage.GetHBitmap
Dim enmStatus As GdPicture_NET_9Ctl.GdPictureStatus
enmStatus = gdcPhoto.DisplayFromHBitmap(lngBitmapPtr)
I suspect something is wrong with my project reference, but I'm not sure how to resolve it.
Note: the com and .net side are both using the interop version of GdPicture .NET 9