imports.h 609 B

1234567891011121314151617181920
  1. #ifndef IMPORTS_H
  2. #define IMPORTS_H
  3. typedef BOOL (WINAPI *AttachConsole_ptr)(DWORD);
  4. typedef BOOL (WINAPI *SleepConditionVariableCS_ptr)(PCONDITION_VARIABLE, PCRITICAL_SECTION, DWORD);
  5. typedef void (WINAPI *WakeConditionVariable_ptr)(PCONDITION_VARIABLE);
  6. typedef struct {
  7. HMODULE kernel32;
  8. AttachConsole_ptr AttachConsole;
  9. SleepConditionVariableCS_ptr SleepConditionVariableCS;
  10. WakeConditionVariable_ptr WakeConditionVariable;
  11. } imports_t;
  12. HMODULE get_dll(const TCHAR *, unsigned long *);
  13. FARPROC get_import(HMODULE, const char *, unsigned long *);
  14. int get_imports();
  15. void free_imports();
  16. #endif