int FileReadInteger(int handle, int size=LONG_VALUE)
The function reads the integer from the current binary file position. The integer format size can be 1, 2 or 4 bytes. If the format size is not specified, the system tries to read the 4-bytes value. To get the detailed error information, one has to call the GetLastError() function.
この関数は、現在のバイナリ ファイルの位置から、整数を読み取ります。1、2 または 4 バイトの整数形式のサイズが指定できます。形式サイズが指定されていない場合は、システムは
4バイトの値の読み取りを試みます。詳細なエラー情報を取得するには、GetLastError() 関数を呼び出します。
Parameters:
パラメータ:
| handle |
- |
FileOpen() 関数によって返されたファイル ハンドル。 |
| size |
- |
Format size. Can be CHAR_VALUE(1 byte), SHORT_VALUE(2 bytes) or LONG_VALUE(4 bytes). 形式サイズ。CHAR_VALUE(1バイト)、SHORT_VALUE(2バイト)、LONG_VALUE(4バイト)を指定できます。 |
|
Sample:
サンプル:
int handle;
int value;
handle=FileOpen("mydata.dat", FILE_BIN|FILE_READ);
if(handle>0)
{
value=FileReadInteger(h1,2);
FileClose(handle);
}
|