Try to throttle using a critical section.
[nssm.git] / imports.h
1 #ifndef IMPORTS_H
2 #define IMPORTS_H
3
4 typedef BOOL (WINAPI *AttachConsole_ptr)(DWORD);
5 typedef BOOL (WINAPI *SleepConditionVariableCS_ptr)(PCONDITION_VARIABLE, PCRITICAL_SECTION, DWORD);
6 typedef void (WINAPI *WakeConditionVariable_ptr)(PCONDITION_VARIABLE);
7
8 typedef struct {
9   HMODULE kernel32;
10   AttachConsole_ptr AttachConsole;
11   SleepConditionVariableCS_ptr SleepConditionVariableCS;
12   WakeConditionVariable_ptr WakeConditionVariable;
13 } imports_t;
14
15 HMODULE get_dll(const char *, unsigned long *);
16 FARPROC get_import(HMODULE, const char *, unsigned long *);
17 int get_imports();
18 void free_imports();
19
20 #endif