
Bitmap in VB -> ATL COM object
How can I pass a handle to a bitmap from VB to a COM object? I've set
up a COM interface with the method Analyze(HBITMAP hImage). When I call
this method from VB, I get the error "Automation type not supported in
Visual Basic." I try calling it with the line
Call MyObject.Analyze(MyPictureBox.Image)
Any idea what I could be doing wrong? Or maybe there is a better way to
attack this. I'm trying to do some image processing on .bmp files, and
I need to modify the image and redraw it while processing. My thought
was to load the file in VB, and pass a bitmap object to my Analyze
function, where I can use CBitmap to gain access to the pixel data.
Then while I process the image, I can (hopefully) easily redraw the
image.
Any help would be greatly appreciated.
Pat Noffke