Commit | Line | Data |
3e09a0ee |
1 | // SErr.cpp - SetLastError routine |
2 | // |
3 | // Converted from assembly to C++ by ShadowFlare. |
4 | // E-mail : blakflare@hotmail.com |
5 | // Webpage : http://sfsrealm.hopto.org/ |
6 | // License information for this code is in license.txt |
7 | |
8 | |
9 | #include "SErr.h" |
10 | |
11 | DWORD dwLastError; |
12 | |
13 | #if (defined(_WIN32) || defined(WIN32)) && !defined(NO_WINDOWS_H) |
14 | |
15 | DWORD WINAPI SErrSetLastError(DWORD dwErrorCode) |
16 | { |
17 | dwLastError = dwErrorCode; |
18 | SetLastError(dwErrorCode); |
19 | return dwErrorCode; |
20 | } |
21 | |
22 | #else |
23 | |
24 | DWORD WINAPI SErrSetLastError(DWORD dwErrorCode) |
25 | { |
26 | return (dwLastError = dwErrorCode); |
27 | } |
28 | |
29 | #endif |
30 | |
31 | DWORD WINAPI SErrGetLastError(VOID) |
32 | { |
33 | return dwLastError; |
34 | } |
35 | |