CloseFile
- Updated2023-02-21
- 1 minute(s) read
CloseFile
int CloseFile (int fileHandle);
Purpose
Closes the file associated with fileHandle. Call OpenFile to obtain a file handle.
![]() |
Caution The Windows SDK also contains a function with the same name. Include windows.h before including formatio.h to ensure that there are no compilation errors as a result of this naming conflict. Define the SDK_CONFLICT_PRIORITYSDK_CONFLICT_PRIORITY macro to force LabWindows/CVI to use the Windows SDK implementation of this function. |
Parameters
Input | ||
Name | Type | Description |
fileHandle | int | Specifies the file to close. This is the value that OpenFile originally returned. |
Return Value
Name | Type | Description |
result | int | Result of the close file operation. If this value is –1, an error occurred. You can use GetFmtIOError to get more information about the type of error that occurred. Any value other than –1 indicates the function completed successfully. |
Additional Information
Library: Formatting and I/O Library
Include file: formatio.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later
Example
Refer to apps\daqmthread\daqMT.cws for an example of using the CloseFile function.