spti.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef NULLOSFT_MLDISC_STPI_HEADER
  2. #define NULLOSFT_MLDISC_STPI_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <windows.h>
  7. // 02:04:01 - LOGICAL UNIT IS IN PROCESS OF BECOMING READY
  8. // 02:3A:00 - MEDIUM NOT PRESENT
  9. // 02:3A:01 - MEDIUM NOT PRESENT - TRAY CLOSED
  10. // 02:3A:02 - MEDIUM NOT PRESENT - TRAY OPEN
  11. // 06:28:00 - MEDIUM NOT PRESENT - NOT READY TO READY CHANGE, MEDIUM MAY HAVE CHANGED
  12. typedef struct _SENSEINFO
  13. {
  14. BYTE bSense;
  15. BYTE bASC;
  16. BYTE bASCQ;
  17. } SENSEINFO;
  18. BOOL SPTI_TestUnitReady(HANDLE hDevice, BYTE *pbSC, BYTE *pbASC, BYTE *pbASCQ, INT timeOutSec);
  19. BOOL SPTI_StartStopUnit(HANDLE hDevice, BOOL bImmediate, BOOL bLoadEject, BOOL bStart, INT timeOutSec, SENSEINFO *pSense);
  20. BOOL SPTI_GetCapabilities(HANDLE hDevice, DWORD *pCap);
  21. // links to read:
  22. // http://www.t10.org/ftp/t10/drafts/mmc3/mmc3r10g.pdf
  23. // http://www.reactos.org/generated/doxygen/da/db8/scsi_8h-source.html
  24. // http://www.vbarchiv.net/workshop/workshop78s4.html
  25. // http://files.codes-sources.com/fichier.aspx?id=26141&f=Graver.h
  26. // http://files.codes-sources.com/fichier.aspx?id=26141&f=Graver.cpp
  27. // http://www.hackingtruths.org/files/cd_cracking/SRC/etc/DDK.SPTI/spti.c
  28. #endif //NULLOSFT_MLDISC_STPI_HEADER