Deprecated OSError, and modified it to require an explicit OS error code.
The deprecated functions include the OSError and OSErrorMsg, the name did not change however the signature of the new functions did. They now require a TOSErrorCode value be passed to them. This value can be retrieved using OSLastError. The reason this was done is because on Windows any win api call can reset the last error code to 0, this change allows the user to immediately grab the error code and worry about the string representation later if needs be.
This commit is contained in:
parent
9540a93d95
commit
bacb20a379
5 changed files with 196 additions and 126 deletions
|
|
@ -489,7 +489,7 @@ proc FD_SET*(Socket: TWinSocket, FDSet: var TFDSet) =
|
|||
proc FD_ZERO*(FDSet: var TFDSet) =
|
||||
FDSet.fd_count = 0
|
||||
|
||||
proc WSAStartup*(wVersionRequired: int16, WSData: var TWSAData): cint {.
|
||||
proc WSAStartup*(wVersionRequired: int16, WSData: ptr TWSAData): cint {.
|
||||
stdcall, importc: "WSAStartup", dynlib: ws2dll.}
|
||||
|
||||
proc getaddrinfo*(nodename, servname: cstring, hints: ptr TAddrInfo,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue