blob: a480c5c3d4951be511244218b8354ef5ae1338c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include <stdbool.h>
#include <search.h>
#include "winnt_types.h"
#include "pe_linker.h"
#include "ntoskernel.h"
#include "log.h"
#include "winexports.h"
#include "util.h"
STATIC DWORD LastError;
STATIC DWORD WINAPI GetLastError(void)
{
//DebugLog("GetLastError() => %#x", LastError);
return LastError;
}
void WINAPI SetLastError(DWORD dwErrCode)
{
//DebugLog("SetLastError(%#x)", dwErrCode);
LastError = dwErrCode;
}
DECLARE_CRT_EXPORT("GetLastError", GetLastError);
DECLARE_CRT_EXPORT("SetLastError", SetLastError);
|