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
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
%>
Re: Calling VB 6.0 DLL Using VbScript