Current News
Archived News
Search News
Discussion Forum


Old Forum
Install Programs More Downloads...
Troubleshooting
Source Code
Format Specs.
Misc. Information
Non-SF Stuff
Links




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
9 #include "SErr.h"
11 DWORD dwLastError;
13 #if (defined(_WIN32) || defined(WIN32)) && !defined(NO_WINDOWS_H)
15 DWORD WINAPI SErrSetLastError(DWORD dwErrorCode)
16 {
17         dwLastError = dwErrorCode;
18         SetLastError(dwErrorCode);
19         return dwErrorCode;
20 }
22 #else
24 DWORD WINAPI SErrSetLastError(DWORD dwErrorCode)
25 {
26         return (dwLastError = dwErrorCode);
27 }
29 #endif
31 DWORD WINAPI SErrGetLastError(VOID)
32 {
33         return dwLastError;
34 }