title: VB6 dll working in VB6 application, not in ASP
body: <p>I'm working on an old project in asp
  I've never worked with vb6 or asp before I am a .net developer</p>
  
  <p>anyway</p>
  
  <p>I made a .net dll and changed some compile options to make it work with vb6
  the code doesnt matter</p>
  
  <p>I made a "wrapper kinda" dll in vb6</p>
  
  <pre><code>Public Function EncryptWrapper(ByVal parameterstring As String, ByVal isShaIn As String, ByVal HashType As String) As String
      Dim o
      Set o = CreateObject("SHA1Module.Conversion")
      EncryptWrapper = CStr(o.EncryptToSHA1(CStr(parameterstring), CBool(isShaIn), CLng(HashType)))
  End Function
  </code></pre>
  
  <p>and a form in vb6 that calls it</p>
  
  <pre><code>    Private Sub Command1_Click()
      Dim message
      Dim myObject
      Set myObject = CreateObject("SHAModuleWrapper.Encryption")
      message = myObject.EncryptWrapper(txtIn.Text, "1", "2")
      Set myObject = Nothing
      txtOut.Text = message
  End Sub
  </code></pre>
  
  <p>this works perfectly</p>
  
  <p>now in asp I try calling that dll and I get an error</p>
  
  <pre><code>&lt;%  Dim strMessage 
      Dim message
      strMessage = "hello"
      Dim myObject
      Set myObject = Server.CreateObject("SHAModuleWrapper.Encryption")
          message = myObject.EncryptWrapper("testdagtestdagtest", "1", "0")
      Response.Write(message)
  %&gt;
  </code></pre>
  
  <p>this is the error message</p>
  
  <p>SHAModuleWrapper error '800a0005' </p>
  
  <p>Invalid procedure call or argument </p>
  
  <p>/asptest/Default.asp, line 15 </p>
  
  <p>It's not the parameters or the output
  it's this part that is causing the trouble</p>
  
  <pre><code>**Dim o
  Set o = CreateObject("SHA1Module.Conversion")
  EncryptWrapper = CStr(o.EncryptToSHA1(CStr(parameterstring), CBool(isShaIn), CLng(HashType)))**
  </code></pre>
  
  <p>Does anybody have an idea?</p>