The Win32 API (application programming interface) is what C/C++ programmers usually use to access the functions that Windows provides.
You can get a good list of them by going to the MSDN web site (msdn.microsoft.com/library) and looking for the "Platform SDK". There are tens of thousands of functions available (if you count all the data-access, Shell, networking, etc.). The GetFileTime function will be in the Windows System Information section, under the "Time" area.
If you know the name of a function, you can use the API Text Viewer that ships with VB to copy the VB version of the C function call into your project. For the GetFileTime function, it looks like:
[tt]
Private Declare Function GetFileTime Lib "kernel32" Alias "GetFileTime" (ByVal hFile As Long, lpCreationTime As FILETIME, lpLastAccessTime As FILETIME, lpLastWriteTime As FILETIME) As Long
[/tt]
Notice that the function returns three parameters of type FILETIME. Using the API Text Viewer again, change the drop-down to "Types", and find that structure name and copy it into your program ahead of the declare statement:
[tt]
Private Type FILETIME
dwLowDateTime As Long
dwHighDateTime As Long
End Type
[/tt]
You won't be able to read the two longs contained in this structure (they're encoded to save space). So you need to call the FileTimeToSystemTime function to convert them to something you can read. Again, using API Text Viewer, you find the function, plus a Type that it uses called SYSTEMTIME:
[tt]
Private Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type
Private Declare Function FileTimeToSystemTime Lib "kernel32" Alias "FileTimeToSystemTime" (lpFileTime As FILETIME, lpSystemTime As SYSTEMTIME) As Long
[/tt]
Which you can finally read.
I hope this gets you started. The Win32 API is a terrific resource for VB programmers, and if you decide to bury deeper into it, I would suggest you get a book called "Dan Appleman's Visual Basic Programmer's Guide to the Win32 API". It's about $48 at amazon.com or bn.com.
Chip H.