niHWS_OpenFile
C Function Prototype
tHWS_Status niHWS_OpenFile (const char filePath[], tHWS_FilePermissions permissions, tHWS_FileHandle* fileHandle);
Purpose
Opens or creates an HWS waveform file. The file must be closed with the niHWS_CloseFile function.
Parameters
Name | Type | Description |
---|---|---|
filePath | const char[] | Specifies the path and filename of the HWS file to create or open. The .hws extension is typically used for HWS files, although using this extension is optional. |
permissions | tHWS_FilePermissions | Specifies file access options
Defined Values niHWS_Val_ReadOnly—Opens an existing file for reading. An error is returned if the specified file does not exist. An error is returned if an attempt is made to write to the file. niHWS_Val_ReadWriteExisting—Opens an existing file for both reading and writing. An error is returned if the specified file does not exist. niHWS_Val_ReadWriteCreateNew—Creates a new file for both reading and writing. An error is returned if the specified file already exists. niHWS_Val_ReadWriteCreateNewAlways—Creates a new file for both reading and writing. If the specified file already exists, its contents are lost. |
fileHandle | tHWS_FileHandle* | Refers to an open HWS file. |