ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Creating a Windows DLL with Visual Basic
Subject:   How can I return Strings?
Date:   2005-07-26 14:20:57
From:   teschste
Response to: How can I return Strings?

Thanks to LaVolpe on PlanetSourceCode, I now know how to pass a string to and from a VB DLL compiled as a standard DLL.


Specifically, when passing a string to the DLL, the DLL needs to convert the string as follows:


sValue = StrConv(sValue, vbUnicode)


When returning a string from the DLL, either via a passed variable in a Sub or as the return value of a Function, the DLL needs to convert the string as follows:


sValue = StrConv(sValue, vbFromUnicode)
Or
MyFunction = StrConv(sValue, vbFromUnicode)


Steve Tesch


1 to 1 of 1
  1. How can I return Strings?
    2005-07-27 13:11:34  teschste [View]

    • How can I return Strings?
      2006-04-14 08:58:40  darkoverlordofdata [View]

      • How can I return Strings?
        2008-10-28 03:57:31  CEStudio [View]

1 to 1 of 1