Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to fix the error on "WIN32_FIND_DATA"?

Status
Not open for further replies.

feipezi

IS-IT--Management
Aug 10, 2006
316
US
Hi,

As I run the code, I'll get errors like "User-Defined type not defined" on WIN32_FIND_DATA. Is there any library in Reference that I did not select? I doubt it. I tried to define myself but still the same message.

Thanks in advance.

Here is the code.


Declare Function FindFirstFile Lib "kernel32.dll" Alias "FindFirstFileA" _
(ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long

Sub Find1stFile()
Dim hsearch As Long ' handle to the file search
Dim findinfo As WIN32_FIND_DATA ' receives info about matching files
Dim success As Long ' will be 1 if successive searches are successful, 0 if not
Dim buffer As Long ' string buffer to use to process the filename(s)
Dim retval As Long ' generic return value

....
....

end sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top