Using VB dll in ASP

J

Jawahar Rajan

All,
I have written a dll in VB (ver 5.0) to check some registry values, the Dll
has a wrapper function called GetRegistryValue, in which I pass the Key name
and the Key value.

For example I have value for my database password in
HKEY_LOCAL_MACHINE\Software\WebReports\DBPWD\PWD

In my ASP page I have (the Dll is WebReports.webReortsVal

Dim objReg
set objReg = Server.CreateObject("WebReports.webReportsVal")

Dim strPWD
strPWD = objReg.GetRegistryValue("Software\WebReports\DBPWD\PWD","PWD")

The Dll use standard windows API Calls to get registry settings, hence I do
not need pass the HKEY_LOCAL_MACHINE

When I check strPWD it is an empty string!
Any Ideas why this is happening, I am not getting an error with the
CreateObject hence I am assuming that the object reference is valid and
also the setting of the strPWD is OK else I would see the error for the
line:
strPWD = objReg.GetRegistryValue("Software\WebReports\DBPWD\PWD","PWD")

Can I use API calls directly in ASP? or am I using the DLL is a wrong way.
(The Dll is registered else the object will not get created.

Any help or suggestions are welcome

Thanks
Jawahar
 
D

Dan Brussee

All,
I have written a dll in VB (ver 5.0) to check some registry values, the Dll
has a wrapper function called GetRegistryValue, in which I pass the Key name
and the Key value.

For example I have value for my database password in
HKEY_LOCAL_MACHINE\Software\WebReports\DBPWD\PWD

In my ASP page I have (the Dll is WebReports.webReortsVal

Dim objReg
set objReg = Server.CreateObject("WebReports.webReportsVal")

Dim strPWD
strPWD = objReg.GetRegistryValue("Software\WebReports\DBPWD\PWD","PWD")

The Dll use standard windows API Calls to get registry settings, hence I do
not need pass the HKEY_LOCAL_MACHINE

When I check strPWD it is an empty string!
Any Ideas why this is happening, I am not getting an error with the
CreateObject hence I am assuming that the object reference is valid and
also the setting of the strPWD is OK else I would see the error for the
line:
strPWD = objReg.GetRegistryValue("Software\WebReports\DBPWD\PWD","PWD")

Can I use API calls directly in ASP? or am I using the DLL is a wrong way.
(The Dll is registered else the object will not get created.

Seems fine to me. Have you debugged your DLL to be sure that it
functions correctly with the parameters passed? Also, I assume you
have registered the DLL on the ASP computer.
 

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,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top