Board index » delphi » Session.PrivateDir and Services
Chris Hedges
![]() Delphi Developer |
Session.PrivateDir and Services2003-12-10 12:39:38 AM delphi16 Hi All I'm having a bit of a problem with a Dll that is used within a Service app that uses the DLL for data access etc. The DLL has a initialisation procedure that is called right away to setup the various settings including the BDE PrivateDir. The PrivateDir is set to a uniquely named folder and Session.PrivateDir is set to point to it. This folder is located in the same folder as the DLL. This is set before any Datamodules or other BDE components are created The Problem is as soon as set the Session.PrivateDir I get a exception raised "Exception raised in STG_DLLInit: Path not found.File: PDOXUSRS.NET" The Net File is specified correctly via the BDE Config, but I am not sure why changing the PrivateDir would cause this error anyway? The Service has Administrator rights by setting the LogOn in Service Properties to my user account so rights shouldn't be an issue? To add a further twist to the problem, the Service app can be run as a Console app in a Dos window and it works perfectly, no errors and works as expected? So any ideas why running the app as a service causes the BDE to kick up a PDOXUSR.NET not found when run as a console it works fine? Thanks for any suggestions in advance as this has me foxed! Cheers Chris Hedges |