VB6 Activex .DLL for IIS

A

Al

Does any one know a way how to use a visual basic 6 written activex .DLL
without registering it with classic .ASP?

Reason why my hosting is charging me for registering .DLL.

TIA.
 
M

McKirahan

Al said:
Does any one know a way how to use a visual basic 6 written activex .DLL
without registering it with classic .ASP?

Reason why my hosting is charging me for registering .DLL.

TIA.

Here's an idea that I haven't tested ...

Try GetObject() instead of Server.CreateObject().

If the component is registered then you will instantiate it as a regular
component :
<%
Dim objDLL
Set objDLL = Server.CreateObject("xxx.dll")
%>

If not, then you can use the Server.MapPath method :
<%
Dim objDLL
Set objDLL = GetObject(Server.MapPath("xxx.dll"))
%>

Adapted from:
Using the component with ASP/VBScript
http://www.mylittletools.net/scripts/en/mlw/methods.asp


Using Components and Objects in ASP
http://www.developerfusion.co.uk/scripts/print.aspx?id=1725
 
A

Al

Thank you much but GetObject() did not work.


McKirahan said:
Here's an idea that I haven't tested ...

Try GetObject() instead of Server.CreateObject().

If the component is registered then you will instantiate it as a regular
component :
<%
Dim objDLL
Set objDLL = Server.CreateObject("xxx.dll")
%>

If not, then you can use the Server.MapPath method :
<%
Dim objDLL
Set objDLL = GetObject(Server.MapPath("xxx.dll"))
%>

Adapted from:
Using the component with ASP/VBScript
http://www.mylittletools.net/scripts/en/mlw/methods.asp


Using Components and Objects in ASP
http://www.developerfusion.co.uk/scripts/print.aspx?id=1725
 
M

McKirahan

Al said:
Thank you much but GetObject() did not work.

Not that it will make a difference, but:

Was it in the same folder as the ASP page?

Otherwise, the following line needs a change:

Set objDLL = GetObject(Server.MapPath("xxx.dll"))
 
T

Tim Slattery

Al said:
Does any one know a way how to use a visual basic 6 written activex .DLL
without registering it with classic .ASP?

I don't think so. An ActiveX Server DLL (which is what you invoke in a
server.CreateObject call) is found by searching the registry. If
there's no entry for it in the registry it can't be found. So it must
be registered.
Reason why my hosting is charging me for registering .DLL.

Because it's a way they can get a few more dollars out of you?
Registering the library takes a small amount of time for one of their
employees. If you haven't written the library properly, it might be
more than a little bit of time. And there's some risk on their part in
running a program on their system that they know nothing about.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top