benilla-re systems structs docs

s_nt5OrLater

global · storm

Address
0xc52414 · 1 bytes, up to 0xc52414
Type
bool
Meaning
Holds whether the system's major version is 5 or more, read on the first call of 0x646e50
Confidence
verified, proof two
Finding
storm/files#opening-a-loose-file

Finding: Opening a loose file in storm: loose files and zip archives

0x647db0(name, mode, wideMode) opens a disk file. With Storm option 11 clear it is fopen(name, mode). With it set, the UTF-8 name becomes 260 UTF-16 units; on Windows 2000 or later (major version 5, read once) it is _wfopen(wide, wideMode), else WideCharToMultiByte turns the units into 260 ANSI bytes and fopen opens those; a result of 0 or less fails. The conversion's result is untested: 260 units or more leave the wide buffer unterminated, and an ANSI result of 260 writes its NUL one byte past the buffer. The count passed back is the bytes read, not the units written, so a non-ASCII name also converts its NUL and stale units after it, failing past 260 bytes.

The derivation is in the doc.