VFS_BeginOutOfOrder(
     HANDLE:hVFSData,
     LPVFSFUNCDATA:lpFuncData,
     UINT:uiOperation,
     LPVFSOUTOFORDERARRAY:pOOOItems
)
→ HANDLE

Arguments

hVFSData

[in] The handle to the namespace instance data

lpFuncData

[in] unused

uiOperation

[in] The type of operation:

VFSOOOP_OTHEROther
VFSOOOP_COPYCopy
VFSOOOP_MOVEMove

pOOOItems

[in,out] Points to a VFSOUTOFORDERARRAY structure listing the items involved in the operation

FieldTypeDescription
cbSizeUINTSize of the structure
pItemsOOOItem*Array of items. Each OOOItem has a pszFile (LPCWSTR) and a dwPrivate (DWORD_PTR) member
cItemCountUINTNumber of items in the pItems array
fReorderedBOOLSet to TRUE if you have re-ordered the pItems array
pszDestLPCWSTRDestination

Return value

Return a handle representing the out-of-order operation. Opus passes it to VFS_GetNextFile and VFS_EndOutOfOrder. If you do not return a valid handle, return one of the following:

VFSOOO_FAILThe operation fails
VFSOOO_FALLBACKOpus falls back to older methods

Description

The VFS_BeginOutOfOrder function is called to begin an out-of-order operation on a set of files.

If the plugin wants or needs to, it can re-order the OOOItem array and set fReordered to TRUE to have Opus update its internal file order for the operation. You must make sure the dwPrivate values in the array are preserved. Re-ordering items this way works even if you return 0 from VFS_BeginOutOfOrder.

If VFS_BeginOutOfOrder fails, there is nowhere to store an error code or message (VFS_GetLastError is not checked afterwards, and is never used for errors relating to the out-of-order functions). If you want to report a specific error code or message, return a "dummy" out-of-order object which reports the error the first time VFS_GetNextFile is called (following the rules about lpszFilePath and VFSGNF_DataValid_FilePath), and then fails with ERROR_NO_MORE_FILES on further calls.

See also VFS_GetNextFile, VFS_EndOutOfOrder and the VFSCAPABILITY_OUTOFORDER capability flag.

This function was added in Directory Opus 10 (VFSPLUGINVERSION 4).