General discussion

Locked

ASP and DLL

By gengle@harringtonsignal. ·
I would I shell to a native DLL within an ASP page? Everything I've found on the web are ActiveX dll's and the createobject command won't work for native DLLs. For example I wish to call a function in the "user32.dll" or whatever. To be honest I'll be making a few native DLLs that will be doing some maintance on the website and one of the functions will be emailing members information when they login/logout etc.

anything like vb's Declare statement? HELP!!! :)

This conversation is currently closed to new comments.

12 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

ASP and DLL

by halleyc In reply to ASP and DLL

Create a ASP Component which will call function in user32.dll. You call the ASP component at your asp script.

Collapse -

ASP and DLL

by gengle@harringtonsignal. In reply to ASP and DLL

to much over head. Why create a COM componet to just wrap a native DLL that it going to be 1 to 2 megs of memory in the computer?

Collapse -

ASP and DLL

by Wayne M. In reply to ASP and DLL

I believe the only way to do this is to create an ActiveX/COM wrapper which calls the desired DLL. VBScript is just a limited subset of VB and I don't believe it supports calling DLLs.

If you want to dig further, try posting a question at:

http://msdnsupport.microsoft.com/default.asp

Just look for the appropriate group; I think there is a scritping newsgroup to ask.

Wayne

Collapse -

ASP and DLL

by gengle@harringtonsignal. In reply to ASP and DLL

to much overhead

Collapse -

ASP and DLL

by jkurtz In reply to ASP and DLL

The easiest way I have found to accomplish something like this is to create an ActiveX DLL that is merely a wrapper for what you want to do in the native DLL.

The concept is to have the ActiveX DLL call the native DLL and return whatever result you are looking for.

Hope that helps.

Jerry Kurtz

Collapse -

ASP and DLL

by gengle@harringtonsignal. In reply to ASP and DLL

to much over head, I think the best way is to use STDOUT/STDIN with a CGI app to run it

Collapse -

ASP and DLL

by amieveryours In reply to ASP and DLL

Since you are calling a DLL files within a web server and you want it to run as an instance on the server, you would use Set varname = Server.CreateObject("proID.name") ex.
Set Conn = Server.CreateObject("ADODB.Connection") where proID is the name of the ado15.dll file and the interface you called is Connection interface of the ado15.dll file. So for you to call your own DLL file you must call your proID or its GUID using Server.CreateObject("proID.name"). If you created the DLL files using VBthen the proID is the name of the project and the interface is the name of the class file. The default project when you create is project1 with a default of one class with name of class1 so to call the dll file you would use Set varname = Server.CreateObject("project1.class1"). Also remember to register the dll files in you web server before you use it. use regsvr32 file.ext. ex) regsvr32 new.dll

Please note: if you program the dll file on the web server then it is automatically registered on the server. I hope

Collapse -

ASP and DLL

by gengle@harringtonsignal. In reply to ASP and DLL

I said no COM/OLE. I am programming NATIVE dlls, that won't work with regsvr32, only com objects do. GUID's aren't placed in native DLLs and I don't wish them to be. The only reason I would have to make a guid is if I made a odl file and compiledit into a TLB file for VB. But still thats not COM

Collapse -

ASP and DLL

by amieveryours In reply to ASP and DLL

Continue from above: Sample.dll

Public function login(email As String) As Integer
If email = tempemail Then
login = 1
End If
End Function

dll file = email.dll
project name = email
class name = check
compiled and register: regsvr32 email.dll

in ASP page:
<%
Set obj = Server.CreateObject("email.check")
login = obj.email = "son@transnet1.com"
If login = 1 Then
Response.Write "You are a valid user."
Else
Response.Write "Email Error!"
End If
%>

Collapse -

ASP and DLL

by gengle@harringtonsignal. In reply to ASP and DLL

I said no COM/OLE, native. regsvr32 won't work on native DLLs, these DLLs aren't programmed in VB at all or any COM/OLE environment.

Back to Web Development Forum
12 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums