Support Board
Date/Time: Wed, 19 Mar 2025 05:41:19 +0000
Post From: ACSIL - file in use after closing it
[2022-10-06 08:23:08] |
tomna1993 - Posts: 24 |
I have a function (see below) to open a file I created before and append data to it then close the file. Sometimes if I want to delete the file it shows me that the file is in use by sierra, but it's not. Could you help me figure out what happens and how can I solve this problem? //--------------------------------------------------------------------
// Save data to log file void SaveDataToLogFile(SCStudyInterfaceRef sc, SCString Path, SCString DataToSave) { int FileHandle; sc.OpenFile(Path, n_ACSIL::FILE_MODE_OPEN_TO_APPEND, FileHandle); unsigned int BytesWritten = 0; unsigned int BytesToWrite = DataToSave.GetLength(); sc.WriteFile(FileHandle, DataToSave, BytesToWrite, &BytesWritten); sc.CloseFile(FileHandle); } |
![]() |