Results 1 to 4 of 4

Thread: Passing a String array from VC++ to VB

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Ireland, Dublin
    Posts
    76

    Passing a String array from VC++ to VB

    Hi,

    My problem is just as the title says, has anyone got any code that does this.
    I'm using an ATL COM Dll and I need to get this working.

    Regards,

    IJ...
    ---------------------------------
    TopMan
    ---------------------------------

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I have code that passes strings, and I have code that passes byte arrays. Will that do?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Ireland, Dublin
    Posts
    76
    It would in deed, I figures out how to pass a String using a BSTR and SysAllocString function (i think that's it).
    I need to pass an array of strings though.

    And I have another problem, I want to pass back a struct I have created, but it don't know how to define it.

    STDMETHODIMP CClass::myFunction(myStruct *ms)

    This doesn't work though, it need to be define as an export or somethin, I'm not sure. Do you know how to do it.

    Regards,

    IJ...

    PS Can you post the code or e-mail it to me at [email protected] , cheers
    ---------------------------------
    TopMan
    ---------------------------------

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Here you are. Written for VC++7, won't compile with 6. It's the important part of a Base64 encoding/decoding ActiveX I wrote.
    Attached Files Attached Files
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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