Welcome, Guest. Please login or register.

Author Topic: ACTION_FINDOUTPUT packet's lock in dp_Arg2 must be shared ?  (Read 2369 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Thomas


Erm, why don't you just use Open ? For asynchronous I/O you only need to detach Read and Write. An asynchronous Open or Close does not make any sense IMHO.

BTW, did you see my example in your previous thread ?

Bye,
Thomas

Offline Thomas

Re: ACTION_FINDOUTPUT packet's lock in dp_Arg2 must be shared ?
« Reply #1 on: March 14, 2006, 07:37:37 AM »

Quote
I wouldn't have have the hassle of creating a new path string to include the name of the file, for every new file I want to create.


You can do

oldcd = CurrentDir(lock);
fhandle = Open(filename,MODE_xy);
CurrentDir (oldcd);

in order to open a file relatively to a lock.

Quote
BTW, the reason a lock on a directory is usefull to me is that the code I've already written allows for global default directories to be defined for various types of stuff.


Did you read all the requirements of the FINDOUTPUT packet ?

For example if your global directory points to Work:Files but the user entered an absolute path like Sys:Prefs into the settings window, you have to make sure that the lock for FINDOUTPUT points to Sys: instead of Work:Files. You cannot just use the global lock.

Bye,
Thomas