I am using the method illustrated on this site http://www.15seconds.com/issue/990723.htm to upload multiple files
However, I am finding that I need to run it once before it works.
i.e. the first time, the Server.CreateObject makes the dll and says
"The remote procedure call failed and did not execute." or
"document contains no data"

Why is the DLL not getting loaded straight away?

The second time it works fine, presumably because the dll is loaded in memory.

I have pasted the ASP page below.
VB Code:
  1. <%@ Language=VBScript %>
  2.  
  3. <%
  4. Option explicit
  5. Response.Buffer = True
  6. On Error Resume Next
  7.  
  8. If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
  9.  
  10.     Dim objUpload
  11.     Dim lngMaxFileBytes
  12.     Dim strUploadPath
  13.     Dim varResult
  14.  
  15.     lngMaxFileBytes = 10000
  16.     strUploadPath = "c:\inetpub\wwwroot\upload\"
  17.    
  18.     Set objUpload = Server.CreateObject("pjUploadFile.clsUpload")
  19.  
  20.     If Err.Number <> 0 Then
  21.  
  22.         Response.Write "The component wasn’t registered"
  23.  
  24.     Else
  25.  
  26.         varResult = objUpload.DoUpload (lngMaxFileBytes, strUploadPath)
  27.         Set objUpload = Nothing
  28.  
  29.         'Write the result
  30.         Dim i
  31.         For i = 0 to UBound(varResult,1)
  32.             Response.Write varResult(i,0) & " : " & varResult(i,1) & "<br>"
  33.         Next
  34.  
  35.     End If
  36.  
  37. End If
  38. %>