CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 1999
    Posts
    18

    Accessing a String Value formVC++ in VB

    Dear Friends;
    There is Dll in VC++ which i am accessing in VB.I need to call a function from that DLL which returns me a String.Which String Datatype should i use in VC++ so that i can recieve it VB as string or variant.

    Please help me ASAP.
    Pavan


  2. #2
    Join Date
    Dec 1999
    Location
    Vienna, Austria
    Posts
    17

    Re: Accessing a String Value formVC++ in VB

    You should always use the BSTR type. You can simply create such a datatype by writing

    CString ReturnString = "abc";

    return ReturnString.AllocSysString();

    This will automatically create a BSTR type.


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