PDA

Click to See Complete Forum and Search --> : damn findfirstfile


MPrestonf12
Aug 6th, 2000, 02:57 PM
When I start my program to find first file I get a "User defined type not defined" Here the code:

'In a module
Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long

Public Type Win_32_Find_data
dwFileAttributes As Long
cFileName As String * 260
End Type

The program does not even get to the procedure under the command button it just gets hung up on this user defined type error. Any hwlp is greatly appreciated!!

parksie
Aug 6th, 2000, 03:14 PM
You've got an extra underscore in your definition. Replace Win_32_Find_data with WIN32_FIND_DATA...and you'll be away.

MPrestonf12
Aug 6th, 2000, 03:19 PM
It works fine now. I appreciate it. thanks

parksie
Aug 6th, 2000, 03:21 PM
No probs...I've had problems with things which seem obvious from someone else's viewpoint before!