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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include <stdbool.h>
#include <search.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include "winnt_types.h"
#include "pe_linker.h"
#include "ntoskernel.h"
#include "log.h"
#include "winexports.h"
#include "util.h"
#include "winstrings.h"
extern void WINAPI SetLastError(DWORD dwErrCode);
static HANDLE WINAPI CreateEventW(PVOID lpEventAttributes, BOOL bManualReset, BOOL bInitialState, PWCHAR lpName)
{
char *AnsiName;
#ifndef NDEBUG
AnsiName = lpName ? CreateAnsiFromWide(lpName) : NULL;
#else
AnsiName = NULL;
#endif
DebugLog("%p, %u, %u, %p [%s]", lpEventAttributes, bManualReset, bInitialState, lpName, AnsiName);
free(AnsiName);
SetLastError(0);
return (HANDLE) 'EVNT';
}
static BOOL WINAPI SetEvent(HANDLE hEvent)
{
DebugLog("%p", hEvent);
return TRUE;
}
static BOOL WINAPI ResetEvent(HANDLE hEvent)
{
DebugLog("%p", hEvent);
return TRUE;
}
DECLARE_CRT_EXPORT("CreateEventW", CreateEventW);
DECLARE_CRT_EXPORT("SetEvent", SetEvent);
DECLARE_CRT_EXPORT("ResetEvent", ResetEvent);
|