Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
956 B

  1. #ifndef SEARCHDB_H
  2. #define SEARCHDB_H
  3. #include <windows.h>
  4. // Messages for communication with search thread and caller
  5. const int WM_SEARCHDB_BASE = WM_USER + 0xabba;
  6. const int WM_SEARCHDB_UPDATE = WM_SEARCHDB_BASE;
  7. const int WM_SEARCHDB_ADDAPP = WM_SEARCHDB_BASE + 1;
  8. const int WM_SEARCHDB_DONE = WM_SEARCHDB_BASE + 2;
  9. // An exe that has an entry in the database
  10. struct SMatchedExe
  11. {
  12. // App Name (Like "Final Fantasy VII")
  13. PTSTR szAppName;
  14. // Path (Like C:\Program Files\SquareSoft\FinalFantasy7\ff7.exe")
  15. PTSTR szPath;
  16. SMatchedExe() : szAppName(0), szPath(0)
  17. {}
  18. ~SMatchedExe()
  19. {
  20. if(szAppName)
  21. delete szAppName;
  22. if(szPath)
  23. delete szPath;
  24. szAppName = szPath = 0;
  25. }
  26. };
  27. SMatchedExe* GetMatchedExe();
  28. BOOL SearchDB(PCTSTR szDrives, HWND hwCaller);
  29. void FreeMatchedExe(SMatchedExe* pme);
  30. void StopSearchDB();
  31. BOOL InitSearchDB();
  32. #endif