Results 1 to 3 of 3

Thread: DLL not destroyed

  1. #1

    Thread Starter
    Frenzied Member agmorgan's Avatar
    Join Date
    Dec 2000
    Location
    Lurking
    Posts
    1,383

    DLL not destroyed

    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. %>

  2. #2
    Addicted Member
    Join Date
    Jun 2005
    Posts
    139

    Re: DLL not destroyed

    I dont know about the above code, but I had downloaded another set of dlls from 15seconds.com which I've implemented and works fine. No complecations. I'm attaching the zip.
    Attached Files Attached Files

  3. #3

    Thread Starter
    Frenzied Member agmorgan's Avatar
    Join Date
    Dec 2000
    Location
    Lurking
    Posts
    1,383

    Re: DLL not destroyed

    The advantage with the sample that I am using is that I can add some extra code to it.
    Specifically I want to Shell an app that will process the files once they are uploaded.

    I can't see a way of doing this without modifying the DLL code.
    Can it be done in the ASP?

    Could this Shell command be causing the error I am seeing?
    If the shelled app hasn't finished by the time the ASP tries to set the object to nothing will it actually get destroyed or not?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width