Click to See Complete Forum and Search --> : ASP calls Activex calls DDL, can't comunicate
Mark Sreeves
Jun 15th, 2000, 02:57 PM
Have you written manyActiveX DLLs for Active Server Pages?
if no ...
are your functions/subs declared byVal?
spower
Jun 15th, 2000, 05:17 PM
Mark, I am not specifying so I guess I'm getting the default. This is the about the third activeX dll I have written. The problem is not with the ActiveX it is with the DLL it calls(ERACOM supplied). I spoke to ERACOM and the said that thier dll needs to read the registry and PWS may not have permission to do so. To test this I wrote an ActiveX dll to read the registry and it worked fine. I know that the DLL is loaded from WINNT because if I try to delete it I can't until I stop the web server. Also the DLL writes a record to the NT event log. I also wrote a VB CGI program to call the ActiveX which it did, the activeX called the DLL, but the DLL did nothing. I then changed the CGI program to call the DLL directly which it did but the DLL still didn't do its job. It only seems to have a problem when I try and run it from the web server. It seems that the web server is blocking the DLL from doing it's job, it has to talk to the ERACOM encyption box on our LAN via TCP and I'm thinking that the web server won't let anything under it's control talk freely on the LAN. As for permissions I have turned on just about everything that can be turned on. Thank you for your time.
If you want to email me it's
stephen.power@bendigobank.com.au
Mark Sreeves
Jun 15th, 2000, 05:39 PM
The default is byRef so you'll need to specify byVal.
I wrote a ASP/VB application which had ASP scripts [running on PWS on my NT workstation] talking to a DLL which read data from a database and wrote files to the HardDrive and then called another DLL which FTPed the files to a remote UNIX box and that all works fine.
I may be wrong but I don't think that PWS will be blocking it.
Clunietp
Jun 15th, 2000, 11:58 PM
try having your web server account log in as administrator -- a restricted user may not have access to the registry keys that your library needs....
Tom
spower
Jun 16th, 2000, 08:14 AM
Tom, I tried your idea and it didn't work, but I believe you are on the right track. I believe the problem is not the registry but the network, remember that this DLL has to talk to an ERACOM box via TCP on our lan. IUSR_mymachine is only defined to my machine, on monday I will have the network guys define IUSR_mymachine to the network and I think it will fix it. To prove this I added a new administrator to my machine and ran the VB program which normally works, this time it failed with the same error the the web server gets. Even though my new user is an administrator it is unknown to the network therefore it cannot talk on the LAN.
I'll let you know on monday how it turns out.
Thank you mark and tom for your time.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.