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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference for WIN32_FIND_DATA in VB6

Status
Not open for further replies.

jwalacha

Programmer
Aug 2, 2002
33
US
Hi,
I want to use the Object "WIN32_FIND_DATA" in my Visual Basic 6.0 module, but unfortunately, I get a Compile Error message "User-Defined type not defined" when I try and run the code.
Can someone tell me what references do I need to add in VB6.0 so that I can use this object?
I am running VB60 on Windows 98 PC.
Thank you.
 
According to the API viewer

Code:
Public Const MAX_PATH = 260

Public Type WIN32_FIND_DATA
        dwFileAttributes As Long
        ftCreationTime As FILETIME
        ftLastAccessTime As FILETIME
        ftLastWriteTime As FILETIME
        nFileSizeHigh As Long
        nFileSizeLow As Long
        dwReserved0 As Long
        dwReserved1 As Long
        cFileName As String * MAX_PATH
        cAlternate As String * 14
End Type

Public Type FILETIME
        dwLowDateTime As Long
        dwHighDateTime As Long
End Type
 
Do I need to go to my menu-bar and select:
Projects > References
..and then the appropriate Available reference for me to use this API ? And if yes, then which one is it?

A bit lost here...

Thanks.
 
nope, this isn't a reference in that sense. You need top cut and paste the above stuff into a module in your project

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Alright,
I understand now.
Thank you, mattKnight and Golom.

Jay.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top