FileTest

A tool for interactive calling file system APIs

Description

The FileTest tool serves for interactive calling of Win32 and NT APIs working with file system (CreateFile, ReadFile, WriteFile, NtCreateFile). You can choose all parameters of e.g. CreateFile function by the mouse, then press the "CreateFile" button. The function will be called, application checks the return value and shows the operation result as text message.

Besides CreateFile, you can also read a file, write to a file, map file to memory etc. It is also useful to combine FileTest utility with the FileSpy.

Asynchronous operations

Beginning with version 2.6.0.474, FileTest no longer waits for an operation to complete if either STATUS_PENDING or ERROR_IO_PENDING is returned by an API. Instead, FileTest stores this operation in a list of pending operations. A watcher thread waits for all operations that are currently in progress. If any of the currently pending operations completes, FileTest's UI shows result of the operation.

The best way to try this feature:

  1. Open a file on remote server for asynchronous access (can be VMWARE)
  2. Disconnect network cable (or disconnect network in VMWARE)
  3. Try to ReadFile or NtReadFile.

In this scenario, you should see the operation pending. As soon as the network redirector fails to contact remote computer (or VMWARE, respectively), the operation will fail and FileTest shows the result.

What is supported

FileTest application

The current version supports the following APIs:

Source codes

Full source of the FileTest is available. The project is organized as workspace MS Visual Studio 2008. If you want to build the project, follow these steps:

  1. Unpack the file to an empty folder
  2. Open the "FileTest" project
  3. Build the EXE.

Download