Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 02:58:15 +0000



Post From: Is it possible to use sc.WriteFile() to write in text mode?

[2018-12-10 10:52:46]
User287992 - Posts: 51
The following code results in file that contains
5465 7374 00
which is HEX representation of "Text" plus line ending. I would expect that it will contain the string as text.

sc.OpenFile(DebugFile, n_ACSIL::FILE_MODE_CREATE_AND_OPEN_FOR_READ_WRITE, DebugFileHandle);
unsigned int * p_BytesWritten = 0;
sc.WriteFile(DebugFileHandle, "Test", sizeof("Test"), p_BytesWritten);