Kernel32.dll has an internal dll API-MS-WIN-CORE-FILE-L1-1-0.DLL used for file operations. FindFirstFile method available in the dll, is used to find files in a directory. Definition of FindFirstFile on msdn - https://msdn.microsoft.com/en-us/library/windows/desktop/aa364418(v=vs.85).aspx
I wanted to use this method in QTP/UFT for performing file operations using Extern object. But not able to come up with the declaration and usage.
Extern.Declare returntype, “FindFirstFile”, "Kernel32.dll”, “FindFirstFileA”, micString, secondparameter
Not able to figure what to provide in return type and second parameter? As per the definition of FindFirstFile, the return type is "search handle" and second parameter is a pointer to the WIN32_FIND_DATA structure.
After declaration how to use the method for finding files?