38.9.4.18 Read CF card file list (optional folder name)
The file list in the IPC CF Card is output to the file, sent as
a parameter. You can optionally define the folder of the file list
you want to get.
Function Name
INT WINAPI
EasyGetListInCfCard(LPCSTR sNodeName, LPCSTR sDirectory, INT*
oiCount, LPCSTR sSaveFileName) ;
Argument
sNodeName: The
station name is fixed as #WinGP.
sDirectory: Gets the
folder name in uppercase characters
oiCount: Number of
files read
sSaveFileName: File
name where directory information is stored. In the defined file,
data stored in the stEasyDirInfo formatted array is, in the
quantity returned in the pioCount, stored as binary data. Saves the
filename and extension in uppercase characters.
struct
stEasyDirInfo {
BYTE
bFileName[8+1];// File name (NULL terminated).
BYTE
bExt[3+1];// File extension (NULL terminated).
BYTE
bDummy[3];// dummy.
DWORD
dwFileSize;// File size.
BYTE
bFileTimeStamp[8+1];// File timestamp (NULL terminated).
BYTE
bDummy2[3];// dummy2.
} ;
Return value (NULL)
Normal End: 0
Problem: Error code
Special Item
More information about bFileTimeStamp: 8 bytes are divided into
two sections. The top 4 bytes are used to store MS-DOS formatted
time, and the bottom 4 bytes are used to store MS-DOS formatted
date, both as hexadecimal values.
MS-DOS formatted dates and times are set up in the following
format.
For example, when the DOS date/time is 20C42C22, 2C22 is the
date and 20C4 is the time. Translated, the date and time is
2002/1/2 04:06:08.
-
Bit 0 to 4
Day of month (1 to 31).
-
Bit 5 to 8
Month of year (1 = January, 2 = February,..., 12 = December).
-
Bit 9 to 15
Year. Starting from 1980. Add 1980 to the value indicated by these
bits to come up with the actual year.
MS-DOS formatted time. The date uses the following format to
pack the date into one 16-bit value.
-
Bit 0 to 4
The number of seconds, divided by 2 (0 to 29).
-
Bit 5 to 10
Minutes (0 to 59).
-
Bit 11 to 15
Hours (24 hour clock 0 to 23).
In the file list read from a WinGP node includes a file name
less than 8 characters or the file extension is less than 3
characters, bFileName[8+1] and bExt[3+1] display as follows.
bFileName[8+1]
|
When the file name is less than 8 characters,
the empty positions at the start are filled in with "0", after that
it's undefined.
|
bExt[3+1]
|
When the file extension is less than 3
characters, the empty positions at the start are filled in with
"0", after that it's undefined.
|
For example, file name and extension is "ABC.D"
bFileName[8+1]
|
0x410x420x430x00******************** (****
asterisks indicate undefined value)
|
bExt[3+1]
|
0x440x00******** (**** asterisks indicate
undefined value)
|
|