This question is related to an earlier one that I posted. But the issue has been boiled down to its simpliest parts. I am sorry for posting to SoPW twice today about this, but I could use some help understanding this.

I've been working with rchiav and have produced a DLL and two ASPs with the following code.

VB ActiveX DLL

Public Function CopyString(ByRef strTo, ByVal strFrom) strTo = strFrom End Function

VB ASP

<%@ Language='VBScript' %> <% Dim strTo Dim strFrom strFrom = "This is my test string" Dim objDLLTest Set objDLLTest = Server.CreateObject("myTest.myClass") objDLLTest.CopyString strTo, strFrom %> <%=strTo%>

PerlScript ASP

<%@ Language='PerlScript' %> <% my $to; my $from = "This is my test string"; my $DLLObject = $Server->CreateObject("myTest.myClass"); $DLLObject->CreateBarChart($to, $from); %> <%=$to?"It is set":"It is not set"%><br> <%=$to%>

The VB ASP result reads "This is my test string". The PerlScript ASP reads "It is not set".

How do I pass and return strings from a VB DLL?


In reply to Passing Strings to VB by THuG

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.