Results 1 to 3 of 3

Thread: Calling VB 6.0 DLL Using VbScript

  1. #1

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    37

    Question Calling VB 6.0 DLL Using VbScript

    hi

    Can Any Tell What Mistake I am doing on this Code When Calling DLL

    <%
    Dim objConvert
    Dim str

    Set objConvert = Server.CreateObject("Islamic_Calendar.PrayerTimes")
    objConvert.Create_XML("One.xml")
    str=objConvert.GetXMLString()
    Response.Write(str)

    %>

    Getting Error Message: HTTP 500.100 - Internal Server Error - ASP error

    What is the Solutions For the How to call dll using Vbscript

  2. #2
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Calling VB 6.0 DLL Using VbScript

    We dont know what your DLL is doing so use this to show the error ..
    (also close the object when your done .. added that below)
    let us know what the error is ..

    One thing i do notice is there is no path given for the File "One.xml"

    To Make the path the same as the ASP page ..
    objConvert.Create_XML (Server.Mappath("./One.xml"))

    Code:
    <%
    Option Explicit
    Response.Buffer = True
    
    On Error Resume Next
    
    Dim objConvert
    Dim str
    
    Set objConvert = Server.CreateObject("Islamic_Calendar.PrayerTimes")
    objConvert.Create_XML ("One.xml")
    str=objConvert.GetXMLString
    Set objConvert = Nothing ' CLOSE OBJECT
    
    If err = 0 Then
        Response.Write str
    Else
        '// SHOW ERROR IF OCCURRED
        Response.Write err.Number & ": " & err.Description
    End if
    
    %>
    Last edited by rory; Jun 26th, 2006 at 12:10 AM.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Calling VB 6.0 DLL Using VbScript

    Moved to VBScript

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