2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
18 #define WIN32_LEAN_AND_MEAN
23 // Global Variables ----------------------------------------------------------
25 static HANDLE _FindFileHandle = INVALID_HANDLE_VALUE;
31 int FileFindFirst(char *search_str, FILEFINDSTRUCT *ffstruct)
35 _FindFileHandle = FindFirstFile((LPSTR)search_str, &find);
36 if (_FindFileHandle == INVALID_HANDLE_VALUE) return 1;
38 ffstruct->size = find.nFileSizeLow;
39 strcpy(ffstruct->name, find.cFileName);
45 int FileFindNext(FILEFINDSTRUCT *ffstruct)
49 if (!FindNextFile(_FindFileHandle, &find)) return 1;
51 ffstruct->size = find.nFileSizeLow;
52 strcpy(ffstruct->name, find.cFileName);
58 int FileFindClose(void)
60 if (!FindClose(_FindFileHandle)) return 1;
65 int GetFileDateTime(int filehandle, FILETIMESTRUCT *ftstruct)
70 retval = GetFileTime((HANDLE)filehandle, NULL, NULL, &filetime);
72 FileTimeToDosDateTime(&filetime, &ftstruct->date, &ftstruct->time);
79 //returns 0 if no error
80 int SetFileDateTime(int filehandle, FILETIMESTRUCT *ftstruct)
85 DosDateTimeToFileTime(ftstruct->date, ftstruct->time, &ft);
86 retval = SetFileTime((HANDLE)filehandle, NULL, NULL, &ft);