FVSDK_ERROR_CODE FVSDK_FindFileClose(FVSDK_Session* pSession);
Closes an open file find operation. Each call to FVSDK_FindFile() should have a corresponding call to FVSDK_FindFileClose(). This function releases allocated memory.
pSession
A pointer to the FVSDK_Session that is to perform the operation.
FVSDK_OK if successful. Error codes can be found in FVSDK_ErrorCodes.h.
// find the file or files in the current directory
if (FVSDK_FindFile(pSession, "*") == FVSDK_YES) {
FVSDK_ERROR_CODE fvecRet;
FVSDK_FileInfo FileInfo;
// initialize the file info structure
FileInfo.nVersion = FVSDK_FILE_INFO_CURRENT_VERSION;
FileInfo.nSize = sizeof(FileInfo);
// find each of the files in the current directory all
do {
// get the current file information and move to the next file
fvecRet = FVSDK_FindNextFile(pSession, &FileInfo);
// ... perform some operations ...
} while ((fvecRet == FVSDK_YES) && (! FVSDK_LastOperationStopped(pSession)));
} // if
else
AfxMessageBox("No files were found.");
// close the file find operation
FVSDK_FindFileClose(pSession);