uiCheckMedium.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #pragma once
  2. #include "./main.h"
  3. #include "./primosdk.h"
  4. #define CHECKMEDIUMUI_MATCH 0x000
  5. #define CHECKMEDIUMUI_NOMATCH 0x001
  6. #define CHECKMEDIUMUI_CANCELED 0x002
  7. #define CHECKMEDIUMUI_PRIMOSDKERROR 0x101
  8. #define CHECKMEDIUMUI_UNABLETOCREATEDIALOG 0x102
  9. #define CHECKMEDIUMUI_MESSAGEPUMPERROR 0x103
  10. #define CHECKMEDIUMUI_DRIVENOTSET 0x104
  11. #define CHECKMEDIUMUI_PRIMOSDKNOTSET 0x105
  12. #define CHECKMEDIUMUI_DISCNOTSET 0x106
  13. #define CHECKMEDIUMUI_DRIVENOTREADY 0x107
  14. #define CHECKMEDIUMUI_DEADLOOP 0x108
  15. class CheckMediumUI
  16. {
  17. public:
  18. BURNLIB_API CheckMediumUI(void);
  19. BURNLIB_API ~CheckMediumUI(void);
  20. public:
  21. BURNLIB_API DWORD Check(obj_primo *primoSDK, DWORD *drive, WAMEDIUMINFO *medium, const wchar_t *description, BOOL disableAIN, BOOL showErase, HWND ownerWnd);
  22. BURNLIB_API DWORD GetPrimoError(void) { return errPrimo; }
  23. protected:
  24. DWORD Rescan(void);
  25. static LRESULT CALLBACK WndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  26. void OnInitDialog(HWND hwndDlg);
  27. void OnCancel(void);
  28. void OnDestroy(void);
  29. void OnEraseClicked(void);
  30. wchar_t* GetMediumInfoText(wchar_t *buffer, unsigned int cchBuffer, WAMEDIUMINFO *info);
  31. wchar_t* GetSizeText(wchar_t *buffer, unsigned int cchBuffer, unsigned int sectors);
  32. protected:
  33. HWND hwnd;
  34. HWND ownerWnd;
  35. WAMEDIUMINFO *desiredMedium;
  36. DWORD *drive;
  37. obj_primo *primoSDK;
  38. DWORD errPrimo;
  39. DWORD errReady;
  40. BOOL disableAIN;
  41. BOOL showErase;
  42. DWORD deadLoop;
  43. const wchar_t *description;
  44. };