CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Location
    Oakland, California
    Posts
    10

    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

  2. #2
    Join Date
    Jul 2001
    Location
    jordan
    Posts
    63
    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
  •  





Click Here to Expand Forum to Full Width

Featured