| |
41 |
41 |
|
| |
42 |
42 |
|
| |
43 |
43 |
|
| |
44 |
44 |
void ReinitializeBuffer(size_t stNewBufferSize); |
| |
45 |
45 |
LPVOID GetBufferPtr(); |
| |
46 |
46 |
|
| |
47 |
47 |
size_t GetBufferSize() const { return m_stBufferSize; } |
| |
48 |
48 |
|
| |
49 |
49 |
|
| |
50 |
50 |
DWORD GetRequestedDataSize() const { return m_dwRequestedDataSize; } |
| |
51 |
51 |
void SetRequestedDataSize(DWORD dwRequestedSize) { m_dwRequestedDataSize = dwRequestedSize; } |
| |
52 |
52 |
|
| |
53 |
53 |
DWORD GetRealDataSize() const { return m_dwRealDataSize; } |
| |
54 |
54 |
void SetRealDataSize(DWORD dwRealDataSize) { m_dwRealDataSize = dwRealDataSize; } |
| |
55 |
55 |
|
| |
56 |
56 |
void SetLastPart(bool bLastPart) { m_bLastPart = bLastPart; } |
| |
57 |
57 |
bool IsLastPart() const { return m_bLastPart; } |
| |
58 |
58 |
|
| |
59 |
59 |
DWORD GetErrorCode() const { return m_dwErrorCode; } |
| |
60 |
60 |
void SetErrorCode(DWORD dwErrorCode) { m_dwErrorCode = dwErrorCode; } |
| |
|
61 |
bool HasError() const { return m_dwErrorCode != ERROR_SUCCESS; } |
| |
61 |
62 |
|
| |
62 |
63 |
|
| |
63 |
64 |
ULONG_PTR GetStatusCode() const { return Internal; } |
| |
64 |
65 |
void SetStatusCode(ULONG_PTR ulStatusCode) { Internal = ulStatusCode; } |
| |
65 |
66 |
|
| |
66 |
67 |
void SetBytesTransferred(ULONG_PTR ulBytes) { InternalHigh = ulBytes; } |
| |
67 |
68 |
ULONG_PTR GetBytesTransferred() const { return InternalHigh; } |
| |
68 |
69 |
|
| |
69 |
70 |
unsigned long long GetFilePosition() const { return (unsigned long long)OffsetHigh << 32 | Offset; } |
| |
70 |
71 |
void SetFilePosition(unsigned long long ullPosition) { OffsetHigh = (DWORD)(ullPosition >> 32); Offset = (DWORD)ullPosition; } |
| |
71 |
72 |
|
| |
72 |
73 |
void* GetParam() const { return m_pParam; } |
| |
73 |
74 |
void SetParam(void* pParam) { m_pParam = pParam; } |
| |
74 |
75 |
|
| |
75 |
76 |
|
| |
76 |
77 |
void InitForRead(unsigned long long ullPosition, DWORD dwRequestedSize); |
| |
77 |
78 |
void InitForWrite(); |
| |
78 |
79 |
void Reset(); |
| |
79 |
80 |
|
| |
80 |
81 |
private: |