|
-
February 10th, 2004, 05:54 PM
#1
Transfer image buffer from vc++ com atl to VB client
Hi,
I am writing a COM component using ATL in VC++ to transfer a
image buffer. I have the image in a char* buffer in the vc++ component.
The client code which has to read this buffer is to be written in VB.
My question is , how should I be passing this image char * buffer
out of my vc++ function. Currently the method signature looks like this :
[id(20), helpstring("method GenerateImage")] HRESULT GenerateImage([out] char* pImageBuffer, [out] SHORT* pImageSize, [out,retval] IMAGE_STATUS* status);
Is this correct ? If so, how will the VB client access this method ?
Thanks a lot for your time,
Kevin
-
February 10th, 2004, 07:14 PM
#2
Sorry I don't know about using Char, but I've used CDC in the past and it worked.
The VC component had the data in a CBitmap/CDC pair and VB had a picture box on the form. I would send the hDC of the picture box to VC and then I'd use BitBlt.
I quit using hat method eventhough it was working fine. I'll give you some code if you wanna try it.
awni
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|