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




CommitLineData
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
11DWORD dwLastError;
12
13#if (defined(_WIN32) || defined(WIN32)) && !defined(NO_WINDOWS_H)
14
15DWORD WINAPI SErrSetLastError(DWORD dwErrorCode)
16{
17 dwLastError = dwErrorCode;
18 SetLastError(dwErrorCode);
19 return dwErrorCode;
20}
21
22#else
23
24DWORD WINAPI SErrSetLastError(DWORD dwErrorCode)
25{
26 return (dwLastError = dwErrorCode);
27}
28
29#endif
30
31DWORD WINAPI SErrGetLastError(VOID)
32{
33 return dwLastError;
34}
35