3 #pragma warning(disable : 4200)
7 //#include <winioctl.h> // platform sdk
8 #include "..\..\include\winddk\ntddcdvd.h"
15 DVD_SESSION_ID m_session
;
22 BYTE m_DiscKey
[6], m_TitleKey
[6];
24 bool GetTitleKey(int lba
, BYTE
* pKey
);
28 virtual ~CDVDSession();
30 bool Open(LPCTSTR path
);
33 operator HANDLE() {return m_hDrive
;}
34 operator DVD_SESSION_ID() {return m_session
;}
36 bool SendKey(DVD_KEY_TYPE KeyType
, BYTE
* pKeyData
);
37 bool ReadKey(DVD_KEY_TYPE KeyType
, BYTE
* pKeyData
, int lba
= 0);
40 class CLBAFile
: private CFile
48 bool Open(LPCTSTR path
);
54 bool Read(BYTE
* buff
);
57 class CVobFile
: public CDVDSession
60 typedef struct {CString fn
; int size
;} file_t
;
61 CAtlArray
<file_t
> m_files
;
63 int m_pos
, m_size
, m_offset
;
65 // currently opened file
69 bool m_fDVD
, m_fHasDiscKey
, m_fHasTitleKey
;
76 bool HasDiscKey(BYTE
* key
);
77 bool HasTitleKey(BYTE
* key
);
79 bool Open(CString fn
, CAtlList
<CString
>& files
/* out */); // vts ifo
80 bool Open(CAtlList
<CString
>& files
, int offset
= -1); // vts vobs, video vob offset in lba
86 bool Read(BYTE
* buff
);