Improve client stability by handling exceptions

This commit is contained in:
yuanyuanxiang
2025-07-16 02:37:33 +08:00
parent 89c6e5014f
commit 965bb64864
23 changed files with 178 additions and 43 deletions

View File

@@ -242,7 +242,6 @@
<None Include="res\Cur\MutiDrag.cur" />
<None Include="res\dword.ico" />
<None Include="res\file.ico" />
<None Include="res\icon1.ico" />
<None Include="res\My2015Remote.rc2" />
<None Include="res\pc.ico" />
<None Include="res\string.ico" />
@@ -382,7 +381,6 @@
</ItemGroup>
<ItemGroup>
<Image Include="res\Bitmap\authorize.bmp" />
<Image Include="res\Bitmap\DrawingBoard.bmp" />
<Image Include="res\Bitmap\DxgiDesktop.bmp" />
<Image Include="res\Bitmap\GrayDesktop.bmp" />
<Image Include="res\Bitmap\note.bmp" />
@@ -404,12 +402,10 @@
<Image Include="res\file\Icon_E.ico" />
<Image Include="res\file\Icon_F.ico" />
<Image Include="res\file\Icon_G.ico" />
<Image Include="res\icon2.ico" />
<Image Include="res\keyboard.ico" />
<Image Include="res\machine.ico" />
<Image Include="res\password.ico" />
<Image Include="res\proxifler.ico" />
<Image Include="res\proxy.ico" />
<Image Include="res\screen.ico" />
<Image Include="res\system.ico" />
<Image Include="res\toolbar1.bmp" />

View File

@@ -131,12 +131,10 @@
<Image Include="res\chat.ico" />
<Image Include="res\decrypt.ico" />
<Image Include="res\delete.bmp" />
<Image Include="res\icon2.ico" />
<Image Include="res\keyboard.ico" />
<Image Include="res\machine.ico" />
<Image Include="res\password.ico" />
<Image Include="res\proxifler.ico" />
<Image Include="res\proxy.ico" />
<Image Include="res\screen.ico" />
<Image Include="res\system.ico" />
<Image Include="res\toolbar1.bmp" />
@@ -150,7 +148,6 @@
<Image Include="res\file\Icon_E.ico" />
<Image Include="res\file\Icon_F.ico" />
<Image Include="res\file\Icon_G.ico" />
<Image Include="res\Bitmap\DrawingBoard.bmp" />
<Image Include="res\DrawingBoard.ico" />
</ItemGroup>
<ItemGroup>
@@ -180,7 +177,6 @@
<None Include="res\Cur\MutiDrag.cur" />
<None Include="res\dword.ico" />
<None Include="res\file.ico" />
<None Include="res\icon1.ico" />
<None Include="res\My2015Remote.rc2" />
<None Include="res\pc.ico" />
<None Include="res\string.ico" />

View File

@@ -845,7 +845,7 @@ void CFileManagerDlg::FixedRemoteFileList(BYTE* pbBuffer, DWORD dwBufferLen)
int iicon = GetIconIndex(pszFileName, nType);
nItem = m_list_remote.InsertItem(nItemIndex++, pszFileName, iicon);
m_list_remote.SetItemData(nItem, nType == FILE_ATTRIBUTE_DIRECTORY);
SHFILEINFO sfi;
SHFILEINFO sfi = {};
SHGetFileInfo(pszFileName, FILE_ATTRIBUTE_NORMAL | nType, &sfi, sizeof(SHFILEINFO), SHGFI_TYPENAME | SHGFI_USEFILEATTRIBUTES);
m_list_remote.SetItemText(nItem, 2, sfi.szTypeName);
}

View File

@@ -717,7 +717,7 @@ void CMachineDlg::ShowHostsList()
LPBYTE lpBuffer = (LPBYTE)(m_ContextObject->m_DeCompressionBuffer.GetBuffer(1));
int i = 0;
char* buf;
char* buf=nullptr;
char* lpString = (char*)lpBuffer;
const char* d = "\n";
char* p = strtok_s(lpString, d, &buf);
@@ -1658,7 +1658,7 @@ void CMachineDlg::ShowHostsList_menu()
DeleteList();
int i = 0;
char* buf;
char* buf=nullptr;
char* lpString = (char*)lpBuffer;
const char* d = "\n";
char* p = strtok_s(lpString, d, &buf);