remove decades-deprecated Win32 API *A function support (#21315)
This commit is contained in:
parent
9b5ae2b2eb
commit
612abda4f4
13 changed files with 173 additions and 414 deletions
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
when defined(windows):
|
||||
import winlean
|
||||
when useWinUnicode and defined(nimPreviewSlimSystem):
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/widestrs
|
||||
elif defined(posix):
|
||||
import posix
|
||||
|
|
@ -199,10 +199,7 @@ proc open*(filename: string, mode: FileMode = fmRead,
|
|||
else: FILE_ATTRIBUTE_NORMAL or flags,
|
||||
0)
|
||||
|
||||
when useWinUnicode:
|
||||
result.fHandle = callCreateFile(createFileW, newWideCString(filename))
|
||||
else:
|
||||
result.fHandle = callCreateFile(createFileA, filename)
|
||||
result.fHandle = callCreateFile(createFileW, newWideCString(filename))
|
||||
|
||||
if result.fHandle == INVALID_HANDLE_VALUE:
|
||||
fail(osLastError(), "error opening file")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue