QMClose |
|
|
The QMClose function closes a file. It is analogous to the QMBasic CLOSE statement.
Format
where
The server maintains a list of files open for processing by the client application. The QMClose function causes the server to close the specified file. It is not normally necessary to close files as there is no practical limit to the number of files that the server can hold open at once, however, for best performance applications should close files if they are unlikely to be referenced for a considerable time.
Examples
The above program fragment opens the CLIENTS file, reads the record identified by ClientNo, and then closes the file. A real program should test the ErrNo status from the read to determine if the action was successful.
Note that the C example leaves variables Rec pointing to a dynamically allocated memory area that must be released using QMFree() when no longer needed. |