imports.h 906 B

12345678910111213141516171819202122232425
  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 BOOL (WINAPI *CreateWellKnownSid_ptr)(WELL_KNOWN_SID_TYPE, SID *, SID *, unsigned long *);
  7. typedef BOOL (WINAPI *IsWellKnownSid_ptr)(SID *, WELL_KNOWN_SID_TYPE);
  8. typedef struct {
  9. HMODULE kernel32;
  10. HMODULE advapi32;
  11. AttachConsole_ptr AttachConsole;
  12. SleepConditionVariableCS_ptr SleepConditionVariableCS;
  13. WakeConditionVariable_ptr WakeConditionVariable;
  14. CreateWellKnownSid_ptr CreateWellKnownSid;
  15. IsWellKnownSid_ptr IsWellKnownSid;
  16. } imports_t;
  17. HMODULE get_dll(const TCHAR *, unsigned long *);
  18. FARPROC get_import(HMODULE, const char *, unsigned long *);
  19. int get_imports();
  20. void free_imports();
  21. #endif