Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetFileTime() - File handle problem.
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00094412
Message ID:
00094492
Views:
21
>>>I am trying to use the GetFileTime() and am having trouble with the file handle type. Which API call should I use to open the file??? TIA,
>>
>>I haven't tested this, but I'd use CreateFile() set to to GENERIC_READ as desired access and FILE_SHARE_READ as the shared mode. I've used this function to set a file time, but not to get it. There's another way besides this to get this information. FindFirstFile() fills the necessary structures, and tells you whether or not the files exists, and gives both the extended and DOS files names. Look at the Windows Filenames in the Download section under Win32 and other APIs.
>>
>>hth,
>
>Thanks George - wouldn't you know it, I found CreateFile straight away after posting the thread. I will look at FindFirstFile() though. I'm actually writing in Borland C++Builder - I hope you don't mind. (My personal projects are in C, work is in VFP. Though most of my personal projects are born at work. This one's for Y2K checking!) Thanks again, hope to take my Guru exams soon!

That's happened to all of us (posting only to have the answer come to mind within moments of hitting "Send"). I don't mind in the least it being in C++, and you're quite welcome. For this project, FindFirstFile might be overkill.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform