VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

cFindFile A Windows API wrapper for FindNext

Greg Duncan  (1 Submission)   Files/File Controls/Input/Output   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

This is a wrapper class for the FindNext functions. The FindNext, and related functions, allow the searching of a drive for a given file.
Wild cards are supported as are UNC and long file names.
It returns a string array, to n-tier enable it. It was also designed for reusability at the source code level. It is currently used by a number (5+) of production applications (in it's current form).
For more details and a usage example, please see the Declarations section of the class.

Inputs
FilePath FileName See the Usage Example or the Declarations for more details.

Returns
String Array

API Declarations
Private Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long
' Rtns True (non zero) on succes, False on failure
Private Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA" (ByVal hFindFile As Long, lpFindFileData As WIN32_FIND_DATA) As Long
' Rtns True (non zero) on succes, False on failure
Private Declare Function FindClose Lib "kernel32" (ByVal hFindFile As Long) As Long

Rate cFindFile A Windows API wrapper for FindNext (2(2 Vote))
cFindFile A Windows API wrapper for FindNext.bas

cFindFile A Windows API wrapper for FindNext Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters