p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_components thread: Accessing other DLL's from a VB COM DLL


Message #1 by dxallen@b... on Thu, 29 Mar 2001 15:27:12
I've written a vb COM dll which accesses DB records using ADO. This works 

fine. I've extended the dll to read in data from txt files using the 

FileSystemObject found in the 'Micrososft Scripting Runtime' - scrrun.dll.



This works ok when run within the vb IDE, but when the COM dll is compiled 

and registered in a MTS package, the text file access fails. 



Do I have to do anything in MTS to allow access to the scrrun.dll ? 



Thanks in advanced.
Message #2 by "Peter Lanoie" <planoie@e...> on Thu, 29 Mar 2001 09:51:12 -0500
This is getting funny... (I hope Imar is on this list)



Two things I can think of:



If you're in VB do you need to use the scripting filesystemobject?  Can you

use regular VB file access? (I don't remember how to do this, did it years

ago though.)



The other thing (Care of Imar Spaanjaars :)

Are you running Norton Antivirus with autoupdate?

I can't find Imar's message about this, but several people on other lists

have had this quirk very recently when dealing with ASP pages.  I don't know

how that would differ in VB .  Apparently, NAV has some 'feature' that

blocks script access to the file system. It's possible that this is your

problem. Someone else had found a setting to shut this off, so you might

want to look into NAV's settings.  Hopefully, they or Imar will see this

thread.



Good Luck!



Peter



-----Original Message-----

From: dxallen@b... [mailto:dxallen@b...]

Sent: Thursday, March 29, 2001 10:27 AM

To: ASP components

Subject: [asp_components] Accessing other DLL's from a VB COM DLL





I've written a vb COM dll which accesses DB records using ADO. This works

fine. I've extended the dll to read in data from txt files using the

FileSystemObject found in the 'Micrososft Scripting Runtime' - scrrun.dll.



This works ok when run within the vb IDE, but when the COM dll is compiled

and registered in a MTS package, the text file access fails.



Do I have to do anything in MTS to allow access to the scrrun.dll ?



Thanks in advanced.

Message #3 by Imar Spaanjaars <Imar@S...> on Thu, 29 Mar 2001 18:00:04 +0200
Hmmm, the Norton Anti Virus ghost popped up again?? ;-)



I have no idea if this is the case in your situation, but check if you're 

running Norton Anti Virus with Auto Update. If you have, either disable the 

"Active Scripting" option in Norton's settings, or revert back to a version 

of NAV from before the update for Active Scripting.



Imar







At 09:51 AM 3/29/2001 -0500, you wrote:

>This is getting funny... (I hope Imar is on this list)

>

>Two things I can think of:

>

>If you're in VB do you need to use the scripting filesystemobject?  Can you

>use regular VB file access? (I don't remember how to do this, did it years

>ago though.)

>

>The other thing (Care of Imar Spaanjaars :)

>Are you running Norton Antivirus with autoupdate?

>I can't find Imar's message about this, but several people on other lists

>have had this quirk very recently when dealing with ASP pages.  I don't know

>how that would differ in VB .  Apparently, NAV has some 'feature' that

>blocks script access to the file system. It's possible that this is your

>problem. Someone else had found a setting to shut this off, so you might

>want to look into NAV's settings.  Hopefully, they or Imar will see this

>thread.

>

>Good Luck!

>

>Peter

>

>-----Original Message-----

>From: dxallen@b... [mailto:dxallen@b...]

>Sent: Thursday, March 29, 2001 10:27 AM

>To: ASP components

>Subject: [asp_components] Accessing other DLL's from a VB COM DLL

>

>

>I've written a vb COM dll which accesses DB records using ADO. This works

>fine. I've extended the dll to read in data from txt files using the

>FileSystemObject found in the 'Micrososft Scripting Runtime' - scrrun.dll.

>

>This works ok when run within the vb IDE, but when the COM dll is compiled

>and registered in a MTS package, the text file access fails.

>

>Do I have to do anything in MTS to allow access to the scrrun.dll ?

>

>Thanks in advanced.




  Return to Index