Object Creation and Initialization
To perform file input/output with IXFile you must first create object, then unlock its functionality by setting valid license key,
and finally initialize it to appropriate mode of operation depending on your needs. All IXFile activities must start with these three
operations performed in given order as shown below:
Uninitialized object is created with Constructor that also enables Unicode system calls
on NT/2000/XP platforms and sets ANSI codepage as a default codepage for ANSI/Unicode conversion; see Unicode Support for more information.
When no longer needed, object should be destroyed (either automatically or manually) to release resources.
License key is set with SetLicenseKey method. You can specify any valid license key either permanent or trial (time-limited).
License key is checked in most of IXFile methods; if it is recognized as invalid or expired methods fail.
See License Keys for more information on license keys.
Object is initialized with Initialize method that sets mode of operation of the object and allocates data buffers.
Correct initialization is crucial because it determines lifetime behaviour of the object which cannot be changed dynamically.
Mode of operation specifies type of access to the object (read, write or both), enables automatic file locking (for reading, writing or both), automatic file closing and specifies byte order
of file data (little- or big-endian). During initialization, file data buffer of specified size is also allocated. Method has default parameters (read and write access, automatic file closing, 16KB buffer)
that allows simplified initialization for quick start. Initialization parameters can be later examined with GetMode and GetBufferSize methods.
int main(int, char**)
ixf2 = new IFile();
ixf2->Initialize(IXF_MODE_READ | IXF_MODE_READLOCK, 1024);
Dim ixf1 As IXFile, ixf2 As IXFile
Set ixf1 = New IXFile
Set ixf2 = New IXFile
ixf2.Initialize IXF_MODE_READ Or IXF_MODE_READLOCK, 1024