
Write String to ASP from ActiveX DLL Component
Thanks Dag. The LONG was just something I was trying based on some sample
code on MS.
At any rate, I tried your suggestion and it doesn't work. I THINK the
procedure requires that the Msg variable be returned to the ASP page as an
array - and that's what I can't figure out how to do.
For example, in the code I am tring to get working, you can replace the last
line with
Msg = "ABCDEF"
and still can't do a response.write of the Msg() item in the ASP page.
Maybe I'm missing something simple.
Quote:
> No wonder...
> You declare Msg() to return a Long!
> Then you assign a String as the return-value
> to a method you just declared to be Long???
> And BTW... don't use the input param-var as
> a local working variable, it's *very bad* coding
> practice... :-)
> Try this:
> Public Function Msg(ByVal strMemo As String) As String
> Dim sRetVal As String
> sRetVal = Replace(strMemo, "A", "Z")
> Msg = sRetVal
> End Function
> HTH...
> Dag.
> > I am sending a string from an asp page to a DLL via but can't get the
> > results back to the asp page. Any help would be appreciated.
> > <%
> > strMemo="ABC"
> > Set objMsg = Server.CreateObject("FAObjects.WriteMessage")
> > Dim WriteIt
> > WriteIt = objMsg.Msg(strMemo)
> > set objMsg = Nothing
> > Response.write WriteIt
> > %>
> > The CLS file contains
> > Option Explicit
> > Public Server As Object
> > Public Request As Object
> > Public Application As Object
> > Public Session As Object
> > Public Response As Object
> > Public ASPsc As ObjectContext
> > Public Function Msg(ByVal strMemo As String) As Long
> > strMemo = Replace(strMemo, "A", "Z")
> > Msg = strMemo
> > End Function