Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CD command in MTDLL - it works but docs say unsupported(
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01065654
Message ID:
01065695
Views:
16
>The documentation says:
>"The CD and CHDIR commands are not supported in either single or multithreaded DLL servers. These commands change the default directory of the entire process, so all threads which are part of the process are affected."
>
>But in my experience if you issue a CD command within a MTDLL, the command does in fact work. So now I wonder: Does CD really perform a process-centric CD, or is it actually only thread-centric, or is it really "not advised" rather than "not supported"?

You should NEVER use CD in an MTDLL. That's because CD is process centric. If you need to access files in other locations it's better to set hte path or explicitly reference the files with FULLPATH() a full path. CHanging the path from within a DLL is not a good idea because you don't know what dependencies the calling process has on the path. If it changes in the middle of processing the host application can easily break.

+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform