reference:plugins:vfs_plugins:vfs_readdirectory

VFS_ReadDirectory(
     HANDLE:hVFSData,
     LPVFSFUNCDATA:lpFuncData,
     LPVFSREADDIRDATA:lpReadDirData
)
→ BOOL

Arguments

hVFSData

[in] The handle to the namespace instance data

lpFuncData

[in] unused

lpReadDirData

[in/out] Pointer to a VFSREADDIRDATA structure

Return value

The function must return TRUE if the directory was read successfully, or FALSE if it could not.

Description

The VFS_ReadDirectory function is called to read the contents of a directory in your plugin's namespace.

The directory contents are returned in a variable length linked list of variable size arrays of VFSFILEDATA structures. Each array must be preceded in memory with a VFSFILEDATAHEADER structure. All memory returned by this function must be allocated with HeapAlloc using the memory heap provided. A pointer to the first VFSFILEDATAHEADER structure must be placed in the lpFileData field of the VFSREADDIRDATA structure.

Several read operations are defined that do not require you to return any directory contents. lpFileData should be set to 0 in these cases.

See the Reading a Directory section for more information on this function.