DFSReadNoWait
Reads the sectors requested from a file using DFS (returns after initiation)
#include <nwdfs.h> LONG DFSReadNoWait ( LONG fileHandle, LONG startingSector, LONG sectorCount, BYTE *buffer, struct DFSCallBackParameters *callBackNode);
NOTE:The actual completion is stored in the completionCode field of the DFSCallBackParameters upon completion of the request.
This function is identical to DFSRead, except that the return to the function caller is made immediately after posting the reads to the driver. This means that the status returned from the function only indicates whether the call was initiated or not. The completion status is returned in the structure provided for completion notification. A calling process must allow other processes to run. Consequently, any long sequence of code including this function call should make frequent calls to ThreadSwitch to allow other processes to be executed.
The DFSCallBackParameters structure is defined as follows:
struct DFSCallBackParameters { LONG localSemaphoreHandle; LONG completionCode; };
The localSemaphoreHandle field contains a local semaphore handle obtained by calling OpenLocalSemaphore. WaitOnLocalSemaphore or ExamineLocalSemaphore should be called to determine when the semaphore has been signalled.
The completionCode field contains the actual completion code, initialized to -1 by this function and updated upon completion. For completion code values, see DFSRead.