Cicode Programming Reference > Cicode Function Categories > Device Functions Introduction > DevSize

DevSize

Gets the size of a physical device.

Syntax

DevSize(hDev)

hDev:

The device handle, returned from the DevOpen() function. The device handle identifies the table where all data on the associated device is stored.

Return Value

If the device is a database device, the number of records is returned. If the device is a binary device, the number of bytes in the file is returned. If an error is detected, -1 is returned.

Related Functions

DevRecNo, DevSeek

Example

INT NoRec;
NoRec=DevSize(hDev);
! Seek to the last record.
DevSeek(hDev,NoRec);

See Also

Device Functions