https://github.com/WinMerge/winmerge/releases/download/Merge7z2201.0/Merge7z2201.0-x64.zip!Build\X64\Release ^
https://github.com/WinMerge/winmerge/releases/download/Merge7z2201.0/Merge7z2201.0-ARM.zip!Build\ARM64\Release ^
https://github.com/WinMerge/winmerge/releases/download/Merge7z2201.0/Merge7z2201.0-ARM64.zip!Build\ARM64\Release ^
-https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.10-x86.zip!Build\x86\Release ^
-https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.10-x64.zip!Build\x64\Release ^
-https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.10-ARM.zip!Build\ARM\Release ^
-https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.10-ARM64.zip!Build\ARM64\Release ^
+https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.11-x86.zip!Build\x86\Release ^
+https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.11-x64.zip!Build\x64\Release ^
+https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.11-ARM.zip!Build\ARM\Release ^
+https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.11-ARM64.zip!Build\ARM64\Release ^
https://github.com/WinMerge/winimerge/releases/download/v1.0.37/winimerge-1.0.37.0-x86.zip!Build\x86\Release ^
https://github.com/WinMerge/winimerge/releases/download/v1.0.37/winimerge-1.0.37.0-x64.zip!Build\x64\Release ^
https://github.com/WinMerge/winimerge/releases/download/v1.0.37/winimerge-1.0.37.0-ARM.zip!Build\ARM\Release ^
-Subproject commit 270d4c0d679168448690b29d50f1397e0047f5cc
+Subproject commit 8329c8c6b6a7809b5950c388ada1061e797975f7
- POCO: 1.10.1
- boost: 1.72.0
-- frhed: 0.10904.2017.10
+- frhed: 0.10904.2017.11
- WinIMerge: 1.0.37.0
- freeimage: 3.18.0
- LibXDiff: 611e42a on Nov 2, 2018 (https://github.com/git/git/tree/master/xdiff)
}
}
bool bDiff = false;
- int lengthFirst = m_pView[0]->GetLength();
+ size_t lengthFirst = m_pView[0]->GetLength();
void *bufferFirst = m_pView[0]->GetBuffer(lengthFirst);
for (int nBuffer = 1; nBuffer < m_nBuffers; nBuffer++)
{
- int length = m_pView[nBuffer]->GetLength();
+ size_t length = m_pView[nBuffer]->GetLength();
if (lengthFirst != length)
bDiff = true;
else
/**
* @brief Get pointer to control's content buffer
*/
-BYTE *CHexMergeView::GetBuffer(int length)
+BYTE *CHexMergeView::GetBuffer(size_t length)
{
return m_pif->get_buffer(length);
}
/**
* @brief Get length of control's content buffer
*/
-int CHexMergeView::GetLength()
+size_t CHexMergeView::GetLength()
{
return m_pif->get_length();
}
HRESULT hr = SE(h != INVALID_HANDLE_VALUE);
if (h == INVALID_HANDLE_VALUE)
return hr;
- DWORD length = GetFileSize(h, 0);
- hr = SE(length != INVALID_FILE_SIZE);
+ LARGE_INTEGER length64{};
+ hr = SE(GetFileSizeEx(h, &length64));
+ if (sizeof(size_t) == 4 && length64.HighPart > 0)
+ hr = E_OUTOFMEMORY;
+ size_t length = static_cast<size_t>(length64.QuadPart);
if (hr == S_OK)
{
if (void *buffer = GetBuffer(length))
{
- DWORD cb = 0;
- hr = SE(ReadFile(h, buffer, length, &cb, 0) && cb == length);
+ size_t pos = 0;
+ while (pos < length && SUCCEEDED(hr))
+ {
+ DWORD cb = 0;
+ hr = SE(ReadFile(h, reinterpret_cast<BYTE *>(buffer) + pos,
+ (length - pos) < 0x10000000 ? static_cast<DWORD>(length - pos) : 0x10000000,
+ &cb, 0));
+ pos += cb;
+ }
if (hr != S_OK)
GetBuffer(0);
}
HRESULT hr = SE(h != INVALID_HANDLE_VALUE);
if (h == INVALID_HANDLE_VALUE)
return hr;
- DWORD length = GetLength();
+ size_t length = GetLength();
void *buffer = GetBuffer(length);
if (buffer == 0)
{
CloseHandle(h);
return E_POINTER;
}
- DWORD cb = 0;
- hr = SE(WriteFile(h, buffer, length, &cb, 0) && cb == length);
+ size_t pos = 0;
+ while (pos < length && SUCCEEDED(hr))
+ {
+ DWORD cb = 0;
+ hr = SE(WriteFile(h, reinterpret_cast<const BYTE*>(buffer) + pos,
+ length - pos < 0x10000000 ? static_cast<DWORD>(length - pos) : 0x10000000, &cb, 0));
+ pos += cb;
+ }
CloseHandle(h);
if (hr != S_OK)
return hr;
HRESULT LoadFile(LPCTSTR);
HRESULT SaveFile(LPCTSTR, bool packing = true);
IHexEditorWindow *GetInterface() const { return m_pif; }
- BYTE *GetBuffer(int);
- int GetLength();
+ BYTE *GetBuffer(size_t);
+ size_t GetLength();
bool GetModified();
void SetSavePoint();
void ClearUndoRecords();
{\r
int iFileChanged;\r
int const(iEnteringMode);\r
- int const(iCurByte);\r
+ size_t const(iCurByte);\r
int const(iCurNibble);\r
- int const(iVscrollMax);\r
- int const(iVscrollPos);\r
+ int64_t const(iVscrollMax64);\r
+ int64_t const(iVscrollPos64);\r
int const(iHscrollMax);\r
int const(iHscrollPos);\r
- int const(bSelected);\r
- int const(iStartOfSelection);\r
- int const(iEndOfSelection);\r
+ bool const(bSelected);\r
+ size_t const(iStartOfSelection);\r
+ size_t const(iEndOfSelection);\r
};\r
\r
struct SharedUndoRecords;\r
\r
virtual unsigned STDMETHODCALLTYPE get_interface_version() = 0;\r
- virtual unsigned char *STDMETHODCALLTYPE get_buffer(int) = 0;\r
- virtual int STDMETHODCALLTYPE get_length() = 0;\r
+ virtual unsigned char *STDMETHODCALLTYPE get_buffer(size_t) = 0;\r
+ virtual size_t STDMETHODCALLTYPE get_length() = 0;\r
virtual void STDMETHODCALLTYPE set_sibling(IHexEditorWindow *) = 0;\r
virtual Colors *STDMETHODCALLTYPE get_colors() = 0;\r
virtual Settings *STDMETHODCALLTYPE get_settings() = 0;\r
virtual Status *STDMETHODCALLTYPE get_status() = 0;\r
virtual void STDMETHODCALLTYPE resize_window() = 0;\r
- virtual void STDMETHODCALLTYPE repaint(int from, int to) = 0;\r
+ virtual void STDMETHODCALLTYPE repaint(size_t from, size_t to) = 0;\r
virtual void STDMETHODCALLTYPE adjust_hscrollbar() = 0;\r
virtual void STDMETHODCALLTYPE adjust_vscrollbar() = 0;\r
virtual int STDMETHODCALLTYPE translate_accelerator(MSG *) = 0;\r