VB5.0, ActiveX, asp, dll problems reading Registery - Please help 
Author Message
 VB5.0, ActiveX, asp, dll problems reading Registery - Please help

Hi Everyone,

I hope someone out can help me.

I have a ActiveX dll written in VB5.0 pro (SP3)

This dll has a call in it to a .bas module in the same dll which
declares calls to the advapi32.dll to read registery keys.

I compile and register the dll with no problems.

I then run a standard VB5.0 pro (SP3) executable and call the dll
Everything works fine, I get the registery data with no problems.

I then wrote a bunch of asp pages using VBScript to call the SAME
dll. All standard calls to this dll to are fine with the exception of
the advapi32.dll calls.

In the Global.asa file I have the call which will return the registery
keys.

However It always return nothing.....

I tracked it down to the advapi32.dll call in the .bas module,
as follows:

Declare Function RegOpenKeyEx& Lib "advapi32.dll" Alias "RegOpenKeyExA"
(ByVal hKey&, _
ByVal lpszSubKey$, dwOptions&, ByVal samDesired&, lpHKey&)

returnval = RegOpenKeyEx(MainKey, SubKey$, 0&, KEY_READ, lpHKey)

After executing this call returnval  contains the value 2 which I cannot
match up with any documented errors.

I've also checked the values in MainKey, SubKey$ and KEY_READ. They
are the same when I call from the .exe or the .asp

I thought that if it works in a standard .exe then under asp it would
work as well, oh well such is life.

I sort of suspect that it might be something to do with PWS having
access to the "advapi32.dll", but I don't know how to follow this
through any further.

I'd really appreciate all the help I can get.

TIA

Brian



Fri, 23 Feb 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem with vb5 activex dll with asp

2. Fortran PowerStation and VB5..reading DLLs please help..

3. Reading Registery Entries - How? - VB5.0 pro SP3

4. Registering ActiveX DLL problem - Help Please

5. VB5 and DLL′s problems. Help, Please

6. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

7. Help with VB5, the registery and Terminal Server

8. ASP ActiveX components created with VB5.0 - problem

9. problem calling ActiveX dll from VBScript in ASP

10. Server side (asp) ActiveX dll calls problem (Form open)

11. problem calling ActiveX dll from VBScript in ASP

12. VB ActiveX DLL + SQL + ASP (Problems)

 

 
Powered by phpBB® Forum Software