Index: src/ch/AboutDlg.cpp =================================================================== diff -u -r4ee5b2305c2ed7776e64e7fbd52952ccfd2a8dd8 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/AboutDlg.cpp (.../AboutDlg.cpp) (revision 4ee5b2305c2ed7776e64e7fbd52952ccfd2a8dd8) +++ src/ch/AboutDlg.cpp (.../AboutDlg.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -55,7 +55,7 @@ else { TCHAR szFull[256]; - _stprintf(szFull, GetResManager()->LoadString(IDS_ABOUTVERSION_STRING), GetApp()->GetAppVersion()); + _sntprintf(szFull, 256, GetResManager()->LoadString(IDS_ABOUTVERSION_STRING), GetApp()->GetAppVersion()); pCtl->SetWindowText(GetApp()->GetAppNameVer()); pCtl2->SetWindowText(szFull); Index: src/ch/AppHelper.cpp =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/AppHelper.cpp (.../AppHelper.cpp) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/AppHelper.cpp (.../AppHelper.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -19,8 +19,9 @@ m_hMutex=NULL; // name of the protection mutex - m_pszMutexName=new TCHAR[_tcslen(m_pszAppName)+sizeof(_T("__ instance"))/sizeof(TCHAR)+1]; - _stprintf(m_pszMutexName, _T("_%s_ instance"), m_pszAppName); + size_t stSize = _tcslen(m_pszAppName)+sizeof(_T("__ instance"))/sizeof(TCHAR)+1; + m_pszMutexName=new TCHAR[stSize]; + _sntprintf(m_pszMutexName, stSize, _T("_%s_ instance"), m_pszAppName); _tcslwr(m_pszMutexName+2); // first letter of appname has to be of predefined case } @@ -48,24 +49,30 @@ void CAppHelper::RetrievePaths() { // try to find '\\' in path to see if this is only exe name or fully qualified path - TCHAR* pszName=_tcsrchr(__argv[0], _T('\\')); +#ifdef _UNICODE + TCHAR* pszArgv = __wargv[0]; +#else + TCHAR* pszArgv = __argv[0]; +#endif + + TCHAR* pszName=_tcsrchr(pszArgv, _T('\\')); if (pszName != NULL) { // copy name m_pszProgramName=new TCHAR[_tcslen(pszName+1)+1]; _tcscpy(m_pszProgramName, pszName+1); // path - UINT uiSize=(UINT)(pszName-__argv[0]); + UINT uiSize=(UINT)(pszName-pszArgv); m_pszProgramPath=new TCHAR[uiSize+1]; - _tcsncpy(m_pszProgramPath, __argv[0], uiSize); + _tcsncpy(m_pszProgramPath, pszArgv, uiSize); m_pszProgramPath[uiSize]=_T('\0'); } else { // copy name - m_pszProgramName=new TCHAR[_tcslen(__argv[0])+1]; - _tcscpy(m_pszProgramName, __argv[0]); + m_pszProgramName=new TCHAR[_tcslen(pszArgv)+1]; + _tcscpy(m_pszProgramName, pszArgv); // path TCHAR szPath[_MAX_PATH]; Index: src/ch/CustomCopyDlg.cpp =================================================================== diff -u -r66e9ad9a512cec46d691cb1ba012424dc7ac8897 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision 66e9ad9a512cec46d691cb1ba012424dc7ac8897) +++ src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -467,21 +467,21 @@ // fill the list TCHAR szData[160], szSize[64]; - _stprintf(szData, GetResManager()->LoadString(IDS_BSEDEFAULT_STRING), GetSizeString(m_ccData.m_bsSizes.m_uiDefaultSize, szSize, true)); + _sntprintf(szData, 160, GetResManager()->LoadString(IDS_BSEDEFAULT_STRING), GetSizeString(m_ccData.m_bsSizes.m_uiDefaultSize, szSize, 64, true)); m_ctlBufferSizes.AddString(szData); if (!m_ccData.m_bsSizes.m_bOnlyDefault) { - _stprintf(szData, GetResManager()->LoadString(IDS_BSEONEDISK_STRING), GetSizeString(m_ccData.m_bsSizes.m_uiOneDiskSize, szSize, true)); + _sntprintf(szData, 160, GetResManager()->LoadString(IDS_BSEONEDISK_STRING), GetSizeString(m_ccData.m_bsSizes.m_uiOneDiskSize, szSize, 64, true)); m_ctlBufferSizes.AddString(szData); - _stprintf(szData, GetResManager()->LoadString(IDS_BSETWODISKS_STRING), GetSizeString(m_ccData.m_bsSizes.m_uiTwoDisksSize, szSize, true)); + _sntprintf(szData, 160, GetResManager()->LoadString(IDS_BSETWODISKS_STRING), GetSizeString(m_ccData.m_bsSizes.m_uiTwoDisksSize, szSize, 64, true)); m_ctlBufferSizes.AddString(szData); - _stprintf(szData, GetResManager()->LoadString(IDS_BSECD_STRING), GetSizeString(m_ccData.m_bsSizes.m_uiCDSize, szSize, true)); + _sntprintf(szData, 160, GetResManager()->LoadString(IDS_BSECD_STRING), GetSizeString(m_ccData.m_bsSizes.m_uiCDSize, szSize, 64, true)); m_ctlBufferSizes.AddString(szData); - _stprintf(szData, GetResManager()->LoadString(IDS_BSELAN_STRING), GetSizeString(m_ccData.m_bsSizes.m_uiLANSize, szSize, true)); + _sntprintf(szData, 160, GetResManager()->LoadString(IDS_BSELAN_STRING), GetSizeString(m_ccData.m_bsSizes.m_uiLANSize, szSize, 64, true)); m_ctlBufferSizes.AddString(szData); } } @@ -589,7 +589,7 @@ if (rFilter.m_bUseSize) { - _stprintf(szLoaded, _T("%s %s"), GetResManager()->LoadString(IDS_LT_STRING+rFilter.m_iSizeType1), GetSizeString(static_cast<__int64>(rFilter.m_ullSize1), szData, true)); + _sntprintf(szLoaded, 1024, _T("%s %s"), GetResManager()->LoadString(IDS_LT_STRING+rFilter.m_iSizeType1), GetSizeString(static_cast<__int64>(rFilter.m_ullSize1), szData, true)); if (rFilter.m_bUseSize2) { @@ -611,7 +611,7 @@ if (rFilter.m_bUseDate) { - _stprintf(szLoaded, _T("%s %s"), GetResManager()->LoadString(IDS_DATECREATED_STRING+rFilter.m_iDateType), GetResManager()->LoadString(IDS_LT_STRING+rFilter.m_iDateType1)); + _sntprintf(szLoaded, 1024, _T("%s %s"), GetResManager()->LoadString(IDS_DATECREATED_STRING+rFilter.m_iDateType), GetResManager()->LoadString(IDS_LT_STRING+rFilter.m_iDateType1)); if (rFilter.m_bDate1) _tcscat(szLoaded, rFilter.m_tDate1.Format(_T(" %x"))); if (rFilter.m_bTime1) Index: src/ch/Device IO.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/Device IO.h (.../Device IO.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/Device IO.h (.../Device IO.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -54,7 +54,7 @@ preg->reg_Flags = 0x8000; // assume error (carry flag set) - HANDLE hDevice = CreateFile("\\\\.\\vwin32", + HANDLE hDevice = CreateFile(_T("\\\\.\\vwin32"), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, (LPSECURITY_ATTRIBUTES) NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, (HANDLE) NULL); @@ -111,7 +111,7 @@ { // compare szSymbolic+iOffset2 with szMapping if (_tcscmp(szMapping, szSymbolic+iOffset2) == 0 - && _tcsncmp(szQuery+iOffset, _T("STORAGE#Volume#"), _tcslen("STORAGE#Volume#")) == 0) + && _tcsncmp(szQuery+iOffset, _T("STORAGE#Volume#"), _tcslen(_T("STORAGE#Volume#"))) == 0) { // now search for 'Signature' and extract (from szQuery+iOffset) pszSignature=_tcsstr(szQuery+iOffset, _T("Signature")); Index: src/ch/Dialogs.cpp =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/Dialogs.cpp (.../Dialogs.cpp) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/Dialogs.cpp (.../Dialogs.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -29,7 +29,7 @@ // code allows browsing on all disks LPMALLOC pMalloc; TCHAR pszBuffer[MAX_PATH]; - sprintf(pszBuffer, "c:\\windows\\system"); + _sntprintf(pszBuffer, _MAX_PATH, _T("c:\\windows\\system")); bool retval=false; /* Gets the Shell's default allocator */ Index: src/ch/DirTreeCtrl.cpp =================================================================== diff -u -r66e9ad9a512cec46d691cb1ba012424dc7ac8897 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/DirTreeCtrl.cpp (.../DirTreeCtrl.cpp) (revision 66e9ad9a512cec46d691cb1ba012424dc7ac8897) +++ src/ch/DirTreeCtrl.cpp (.../DirTreeCtrl.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -129,38 +129,33 @@ BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, - LPSTR lpFriendlyName) + LPTSTR lpFriendlyName) { BOOL bSuccess=TRUE; STRRET str; if (NOERROR==lpsf->GetDisplayNameOf(lpi,dwFlags, &str)) { - switch (str.uType) - { - case STRRET_WSTR: - - WideCharToMultiByte(CP_ACP, // CodePage - 0, // dwFlags - str.pOleStr, // lpWideCharStr - -1, // cchWideChar - lpFriendlyName, // lpMultiByteStr - MAX_PATH, - //sizeof(lpFriendlyName), // cchMultiByte, wrong. sizeof on a pointer, psk, psk - NULL, // lpDefaultChar, - NULL); // lpUsedDefaultChar - - break; - + switch (str.uType) + { + case STRRET_WSTR: + { + CW2T cw2t(str.pOleStr); + lstrcpy(lpFriendlyName, cw2t); + break; + } case STRRET_OFFSET: + { + lstrcpy(lpFriendlyName, (LPTSTR)lpi+str.uOffset); + break; + } - lstrcpy(lpFriendlyName, (LPSTR)lpi+str.uOffset); - break; - case STRRET_CSTR: - - lstrcpy(lpFriendlyName, (LPSTR)str.cStr); - break; + { + CA2T ca2t(str.cStr); + lstrcpy(lpFriendlyName, ca2t); + break; + } default: bSuccess = FALSE; @@ -175,8 +170,7 @@ LPITEMIDLIST GetFullyQualPidl(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi) { - char szBuff[MAX_PATH]; - OLECHAR szOleChar[MAX_PATH]; + TCHAR szBuff[MAX_PATH]; LPSHELLFOLDER lpsfDeskTop; LPITEMIDLIST lpifq; ULONG ulEaten, ulAttribs; @@ -190,16 +184,10 @@ if (FAILED(hr)) return NULL; - MultiByteToWideChar(CP_ACP, - MB_PRECOMPOSED, - szBuff, - -1, - szOleChar, - sizeof(szOleChar)); - + CT2W ct2w(szBuff); hr=lpsfDeskTop->ParseDisplayName(NULL, NULL, - szOleChar, + ct2w, &ulEaten, &lpifq, &ulAttribs); Index: src/ch/DirTreeCtrl.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/DirTreeCtrl.h (.../DirTreeCtrl.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/DirTreeCtrl.h (.../DirTreeCtrl.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -71,7 +71,7 @@ LPITEMIDLIST ConcatPidls(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); LPITEMIDLIST GetFullyQualPidl(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi); LPITEMIDLIST CopyITEMID(LPMALLOC lpMalloc, LPITEMIDLIST lpi); -BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPSTR lpFriendlyName); +BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPTSTR lpFriendlyName); LPITEMIDLIST CreatePidl(UINT cbSize); void FreePidl(LPITEMIDLIST lpiidl); UINT GetSize(LPCITEMIDLIST pidl); Index: src/ch/DstFileErrorDlg.cpp =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/DstFileErrorDlg.cpp (.../DstFileErrorDlg.cpp) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/DstFileErrorDlg.cpp (.../DstFileErrorDlg.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -83,7 +83,7 @@ EndDialog(ID_WAIT); } -void CDstFileErrorDlg::OnTimer(UINT nIDEvent) +void CDstFileErrorDlg::OnTimer(UINT_PTR nIDEvent) { if (nIDEvent == 1601) { Index: src/ch/DstFileErrorDlg.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/DstFileErrorDlg.h (.../DstFileErrorDlg.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/DstFileErrorDlg.h (.../DstFileErrorDlg.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -57,7 +57,7 @@ afx_msg void OnRetryButton(); afx_msg void OnIgnoreButton(); afx_msg void OnWaitButton(); - afx_msg void OnTimer(UINT nIDEvent); + afx_msg void OnTimer(UINT_PTR nIDEvent); virtual BOOL OnInitDialog(); afx_msg void OnIgnoreAllButton(); //}}AFX_MSG Index: src/ch/ExceptionEx.h =================================================================== diff -u -r66e9ad9a512cec46d691cb1ba012424dc7ac8897 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/ExceptionEx.h (.../ExceptionEx.h) (revision 66e9ad9a512cec46d691cb1ba012424dc7ac8897) +++ src/ch/ExceptionEx.h (.../ExceptionEx.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -103,7 +103,7 @@ TCHAR szBuf[1024]; va_list marker; va_start(marker, pszReason); - _vstprintf(szBuf, pszReason, marker); + _vsntprintf(szBuf, 1024, pszReason, marker); va_end(marker); TCHAR *pszData=new TCHAR[_tcslen(szBuf)+1]; _tcscpy(pszData, szBuf); @@ -139,25 +139,25 @@ case dtString: { if (pszDesc) - _stprintf(szData, _T("\r\n\t%s: %s"), pepi[i].szName, (TCHAR*)pepi[i].pData); + _sntprintf(szData, 1024, _T("\r\n\t%s: %s"), pepi[i].szName, (TCHAR*)pepi[i].pData); else - _stprintf(szData, _T("%s: %s\r\n"), pepi[i].szName, (TCHAR*)pepi[i].pData); + _sntprintf(szData, 1024, _T("%s: %s\r\n"), pepi[i].szName, (TCHAR*)pepi[i].pData); break; } case dtPtrToString: { if (pszDesc) - _stprintf(szData, _T("\r\n\t%s: %s"), pepi[i].szName, *((TCHAR**)pepi[i].pData)); + _sntprintf(szData, 1024, _T("\r\n\t%s: %s"), pepi[i].szName, *((TCHAR**)pepi[i].pData)); else - _stprintf(szData, _T("%s: %s\r\n"), pepi[i].szName, *((TCHAR**)pepi[i].pData)); + _sntprintf(szData, 1024, _T("%s: %s\r\n"), pepi[i].szName, *((TCHAR**)pepi[i].pData)); break; } case dtDword: { if (pszDesc) - _stprintf(szData, _T("\r\n\t%s: %lu"), pepi[i].szName, *((DWORD*)pepi[i].pData)); + _sntprintf(szData, 1024, _T("\r\n\t%s: %lu"), pepi[i].szName, *((DWORD*)pepi[i].pData)); else - _stprintf(szData, _T("%s: %lu\r\n"), pepi[i].szName, *((DWORD*)pepi[i].pData)); + _sntprintf(szData, 1024, _T("%s: %lu\r\n"), pepi[i].szName, *((DWORD*)pepi[i].pData)); break; } case dtSysError: @@ -171,9 +171,9 @@ szSystem[dwPos]=_T('\0'); if (pszDesc) - _stprintf(szData, _T("\r\n\t%s: %lu (%s)"), pepi[i].szName, *((DWORD*)pepi[i].pData), szSystem); + _sntprintf(szData, 1024, _T("\r\n\t%s: %lu (%s)"), pepi[i].szName, *((DWORD*)pepi[i].pData), szSystem); else - _stprintf(szData, _T("%s: %lu (%s)\r\n"), pepi[i].szName, *((DWORD*)pepi[i].pData), szSystem); + _sntprintf(szData, 1024, _T("%s: %lu (%s)\r\n"), pepi[i].szName, *((DWORD*)pepi[i].pData), szSystem); break; } Index: src/ch/FileEx.h =================================================================== diff -u -r66e9ad9a512cec46d691cb1ba012424dc7ac8897 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/FileEx.h (.../FileEx.h) (revision 66e9ad9a512cec46d691cb1ba012424dc7ac8897) +++ src/ch/FileEx.h (.../FileEx.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -50,7 +50,7 @@ #define __FUNCTION__ "" #endif -#define THROW_FILEEXCEPTIONEX(str_reason, filename, app_code, last_error) throw new CFileExceptionEx(__FILE__, __LINE__, __FUNCTION__, str_reason, filename, app_code, last_error) +#define THROW_FILEEXCEPTIONEX(str_reason, filename, app_code, last_error) throw new CFileExceptionEx(_T(__FILE__), __LINE__, _T(__FUNCTION__), str_reason, filename, app_code, last_error) // File exception errors #define FERR_UNKNOWN 0 Index: src/ch/FileInfo.cpp =================================================================== diff -u -rb6c0200e96d843e7cbaff501d9fa898e99929052 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/FileInfo.cpp (.../FileInfo.cpp) (revision b6c0200e96d843e7cbaff501d9fa898e99929052) +++ src/ch/FileInfo.cpp (.../FileInfo.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -885,7 +885,8 @@ // force create directory // AfxMessageBox("Created multiple level of paths for %s"+strPath+str); - MakeSureDirectoryPathExists(strPath+str); + SHCreateDirectoryEx(NULL, strPath+str, NULL); +// MakeSureDirectoryPathExists(strPath+str); // AfxMessageBox(strPath+str+fname+CString(ext)); return strPath+str+fname+CString(ext); @@ -961,7 +962,7 @@ if (pFilters->Match(finf)) Add(finf); } - else if ( strcmp(wfd.cFileName, _T(".")) != 0 && strcmp(wfd.cFileName, _T("..")) != 0) + else if ( _tcscmp(wfd.cFileName, _T(".")) != 0 && _tcscmp(wfd.cFileName, _T("..")) != 0) { if (bIncludeDirs) { Index: src/ch/FolderDialog.cpp =================================================================== diff -u -r66e9ad9a512cec46d691cb1ba012424dc7ac8897 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/FolderDialog.cpp (.../FolderDialog.cpp) (revision 66e9ad9a512cec46d691cb1ba012424dc7ac8897) +++ src/ch/FolderDialog.cpp (.../FolderDialog.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -201,7 +201,7 @@ CRect rc(0, 0, 0, 0); if (!m_ctlTitle.Create(_T(""), WS_CHILD | WS_VISIBLE, rc, this, IDC_TITLE_STATIC) || - (__g_pfStatic=(WNDPROC)SetWindowLong(m_ctlTitle.GetSafeHwnd(), GWL_WNDPROC, (LONG)CustomWindowProc)) == 0) + (__g_pfStatic=(WNDPROC)SetWindowLong(m_ctlTitle.GetSafeHwnd(), GWLP_WNDPROC, (LONG)CustomWindowProc)) == 0) { TRACE("Error creating control..."); return -1; @@ -246,7 +246,7 @@ // listview if (!m_ctlShortcuts.Create(WS_CHILD | WS_VISIBLE | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_EDITLABELS | WS_TABSTOP | LVS_SMALLICON | LVS_SHOWSELALWAYS, rc, this, IDC_SHORTCUT_LIST) || - (__g_pfList=(WNDPROC)SetWindowLong(m_ctlShortcuts.GetSafeHwnd(), GWL_WNDPROC, (LONG)CustomWindowProc)) == 0) + (__g_pfList=(WNDPROC)SetWindowLong(m_ctlShortcuts.GetSafeHwnd(), GWLP_WNDPROC, (LONG)CustomWindowProc)) == 0) { TRACE("Error creating control..."); return -1; @@ -267,38 +267,38 @@ // combobox rc.bottom=rc.top+200; if (!m_ctlPath.Create(WS_CHILD | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN | CBS_SORT | CBS_OWNERDRAWFIXED | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, rc, this, IDC_PATH_COMBOBOXEX) || - (__g_pfCombo=(WNDPROC)SetWindowLong(m_ctlPath.GetSafeHwnd(), GWL_WNDPROC, (LONG)CustomWindowProc)) == 0) + (__g_pfCombo=(WNDPROC)SetWindowLong(m_ctlPath.GetSafeHwnd(), GWLP_WNDPROC, (LONG)CustomWindowProc)) == 0) { TRACE("Error creating control..."); return -1; } HWND hCombo=(HWND)m_ctlPath.SendMessage(CBEM_GETCOMBOCONTROL, 0, 0); - if ((__g_pfBaseCombo=(WNDPROC)SetWindowLong(hCombo, GWL_WNDPROC, (LONG)ComboWindowProc)) == 0) + if ((__g_pfBaseCombo=(WNDPROC)SetWindowLong(hCombo, GWLP_WNDPROC, (LONG)ComboWindowProc)) == 0) return -1; HWND hEdit=(HWND)m_ctlPath.SendMessage(CBEM_GETEDITCONTROL, 0, 0); - if ((__g_pfEdit=(WNDPROC)SetWindowLong(hEdit, GWL_WNDPROC, (LONG)EditWindowProc)) == 0) + if ((__g_pfEdit=(WNDPROC)SetWindowLong(hEdit, GWLP_WNDPROC, (LONG)EditWindowProc)) == 0) return -1; // buttons OK & Cancel rc.bottom=rc.top; if (!m_ctlOk.Create(_T(""), WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON, rc, this, IDOK) || - (__g_pfButton=(WNDPROC)SetWindowLong(m_ctlOk.GetSafeHwnd(), GWL_WNDPROC, (LONG)CustomWindowProc)) == 0) + (__g_pfButton=(WNDPROC)SetWindowLong(m_ctlOk.GetSafeHwnd(), GWLP_WNDPROC, (LONG)CustomWindowProc)) == 0) { TRACE("Error creating control..."); return -1; } m_ctlOk.SetFont(GetFont()); if (!m_ctlCancel.Create(_T(""), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, rc, this, IDCANCEL) || - !((WNDPROC)SetWindowLong(m_ctlCancel.GetSafeHwnd(), GWL_WNDPROC, (LONG)CustomWindowProc))) + !((WNDPROC)SetWindowLong(m_ctlCancel.GetSafeHwnd(), GWLP_WNDPROC, (LONG)CustomWindowProc))) { TRACE("Error creating control..."); return -1; } m_ctlCancel.SetFont(GetFont()); if (!m_ctlToggle.Create(_T(""), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, rc, this, IDC_TOGGLE_BUTTON) || - !((WNDPROC)SetWindowLong(m_ctlToggle.GetSafeHwnd(), GWL_WNDPROC, (LONG)CustomWindowProc))) + !((WNDPROC)SetWindowLong(m_ctlToggle.GetSafeHwnd(), GWLP_WNDPROC, (LONG)CustomWindowProc))) { TRACE("Error creating control..."); return -1; @@ -573,7 +573,7 @@ /////////////////////////////////////////////////////////////////////////// // Displays dialog from __g_DlgTemplate -int CFolderDialog::DoModal() +INT_PTR CFolderDialog::DoModal() { if (!InitModalIndirect((LPCDLGTEMPLATE)__g_DlgTemplate)) return -1; Index: src/ch/FolderDialog.h =================================================================== diff -u -r66e9ad9a512cec46d691cb1ba012424dc7ac8897 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/FolderDialog.h (.../FolderDialog.h) (revision 66e9ad9a512cec46d691cb1ba012424dc7ac8897) +++ src/ch/FolderDialog.h (.../FolderDialog.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -58,7 +58,7 @@ // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CFolderDialog) public: - virtual int DoModal(); + virtual INT_PTR DoModal(); protected: virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); //}}AFX_VIRTUAL Index: src/ch/IniFile.cpp =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/IniFile.cpp (.../IniFile.cpp) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/IniFile.cpp (.../IniFile.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -216,23 +216,23 @@ while (cit != m_vConfigProfiles.end()) { // store profile name - iLen=_stprintf(szLine, _T("<%s>"), (*cit)->pszProfileName); + iLen=_sntprintf(szLine, MAX_LINE, _T("<%s>"), (*cit)->pszProfileName); file.WriteLine(szLine); // enumerate through sections sit=(*cit)->vSections.begin(); while (sit != (*cit)->vSections.end()) { // write section name - iLen=_stprintf(szLine, _T("[%s]"), (*sit)->pszSectionName); + iLen=_sntprintf(szLine, MAX_LINE, _T("[%s]"), (*sit)->pszSectionName); file.WriteLine(szLine); // enumerate through attributes eit=(*sit)->vEntries.begin(); while(eit != (*sit)->vEntries.end()) { // store data - iLen=_stprintf(szLine, _T("%s=%s"), (*eit)->pszKey, (*eit)->pszValue); + iLen=_sntprintf(szLine, MAX_LINE, _T("%s=%s"), (*eit)->pszKey, (*eit)->pszValue); file.WriteLine(szLine); // analyze next element Index: src/ch/MainWnd.cpp =================================================================== diff -u -r66e9ad9a512cec46d691cb1ba012424dc7ac8897 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/MainWnd.cpp (.../MainWnd.cpp) (revision 66e9ad9a512cec46d691cb1ba012424dc7ac8897) +++ src/ch/MainWnd.cpp (.../MainWnd.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -1505,7 +1505,7 @@ { if (m_tasks.GetSize() != 0) { - _stprintf(text, _T("%s - %d %%"), GetApp()->GetAppName(), m_tasks.GetPercent()); + _sntprintf(text, _MAX_PATH, _T("%s - %d %%"), GetApp()->GetAppName(), m_tasks.GetPercent()); m_ctlTray.SetTooltipText(text); } else @@ -1547,7 +1547,7 @@ CWnd::OnClose(); } -void CMainWnd::OnTimer(UINT nIDEvent) +void CMainWnd::OnTimer(UINT_PTR nIDEvent) { switch (nIDEvent) { @@ -1951,7 +1951,8 @@ j=0; } - AfxMessageBox(reinterpret_cast(dec)); + CA2T ca2t(reinterpret_cast(dec)); + AfxMessageBox(ca2t); delete [] dec; break; @@ -2017,7 +2018,7 @@ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErr, 0, szStr, 256, NULL); while (szStr[_tcslen(szStr)-1] == _T('\n') || szStr[_tcslen(szStr)-1] == _T('\r') || szStr[_tcslen(szStr)-1] == _T('.')) szStr[_tcslen(szStr)-1]=_T('\0'); - _stprintf(szText, GetResManager()->LoadString(IDS_REGISTERERR_STRING), dwErr, szStr); + _sntprintf(szText, 768, GetResManager()->LoadString(IDS_REGISTERERR_STRING), dwErr, szStr); AfxMessageBox(szText, MB_ICONERROR | MB_OK); } } @@ -2033,7 +2034,7 @@ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErr, 0, szStr, 256, NULL); while (szStr[_tcslen(szStr)-1] == _T('\n') || szStr[_tcslen(szStr)-1] == _T('\r') || szStr[_tcslen(szStr)-1] == _T('.')) szStr[_tcslen(szStr)-1]=_T('\0'); - _stprintf(szText, GetResManager()->LoadString(IDS_UNREGISTERERR_STRING), dwErr, szStr); + _sntprintf(szText, 768, GetResManager()->LoadString(IDS_UNREGISTERERR_STRING), dwErr, szStr); AfxMessageBox(szText, MB_ICONERROR | MB_OK); } } @@ -2081,7 +2082,7 @@ if (!GetApp()->HtmlHelp(HH_DISPLAY_TOPIC, NULL)) { TCHAR szStr[512+2*_MAX_PATH]; - _stprintf(szStr, GetResManager()->LoadString(IDS_HELPERR_STRING), GetApp()->GetHelpPath()); + _sntprintf(szStr, 512+2*_MAX_PATH, GetResManager()->LoadString(IDS_HELPERR_STRING), GetApp()->GetHelpPath()); AfxMessageBox(szStr, MB_OK | MB_ICONERROR); } Index: src/ch/MainWnd.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/MainWnd.h (.../MainWnd.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/MainWnd.h (.../MainWnd.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -83,7 +83,7 @@ afx_msg void OnPopupShowStatus(); afx_msg void OnPopupShowOptions(); afx_msg void OnClose(); - afx_msg void OnTimer(UINT nIDEvent); + afx_msg void OnTimer(UINT_PTR nIDEvent); afx_msg BOOL OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pCopyDataStruct); afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg void OnShowMiniView(); Index: src/ch/MiniViewDlg.cpp =================================================================== diff -u -r66e9ad9a512cec46d691cb1ba012424dc7ac8897 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/MiniViewDlg.cpp (.../MiniViewDlg.cpp) (revision 66e9ad9a512cec46d691cb1ba012424dc7ac8897) +++ src/ch/MiniViewDlg.cpp (.../MiniViewDlg.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -124,7 +124,7 @@ return TRUE; } -void CMiniViewDlg::OnTimer(UINT nIDEvent) +void CMiniViewDlg::OnTimer(UINT_PTR nIDEvent) { if (nIDEvent == 9843) { Index: src/ch/MiniViewDlg.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/MiniViewDlg.h (.../MiniViewDlg.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/MiniViewDlg.h (.../MiniViewDlg.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -107,7 +107,7 @@ //{{AFX_MSG(CMiniViewDlg) afx_msg HBRUSH OnCtlColor(CDC*, CWnd*, UINT); virtual BOOL OnInitDialog(); - afx_msg void OnTimer(UINT nIDEvent); + afx_msg void OnTimer(UINT_PTR nIDEvent); afx_msg void OnSelchangeProgressList(); afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point); afx_msg void OnLButtonUp(UINT nFlags, CPoint point); Index: src/ch/NotEnoughRoomDlg.cpp =================================================================== diff -u -re701ed2460c2558eeefab55a1f3ed1d2c89a56c0 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/NotEnoughRoomDlg.cpp (.../NotEnoughRoomDlg.cpp) (revision e701ed2460c2558eeefab55a1f3ed1d2c89a56c0) +++ src/ch/NotEnoughRoomDlg.cpp (.../NotEnoughRoomDlg.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -69,7 +69,7 @@ { // format needed text TCHAR szText[2048]; - _stprintf(szText, GetResManager()->LoadString(IDS_NERPATH_STRING), m_strDisk); + _sntprintf(szText, 2048, GetResManager()->LoadString(IDS_NERPATH_STRING), m_strDisk); CWnd* pWnd=GetDlgItem(IDC_HEADER_STATIC); if (pWnd) pWnd->SetWindowText(szText); @@ -78,11 +78,11 @@ TCHAR szData[128]; pWnd=GetDlgItem(IDC_REQUIRED_STATIC); if (pWnd) - pWnd->SetWindowText(GetSizeString(m_llRequired, szData)); + pWnd->SetWindowText(GetSizeString(m_llRequired, szData, 128)); __int64 llFree; pWnd=GetDlgItem(IDC_AVAILABLE_STATIC); if (pWnd && GetDynamicFreeSpace(m_strDisk, &llFree, NULL)) - pWnd->SetWindowText(GetSizeString(llFree, szData)); + pWnd->SetWindowText(GetSizeString(llFree, szData, 128)); } BOOL CNotEnoughRoomDlg::OnInitDialog() @@ -106,7 +106,7 @@ return TRUE; } -void CNotEnoughRoomDlg::OnTimer(UINT nIDEvent) +void CNotEnoughRoomDlg::OnTimer(UINT_PTR nIDEvent) { if (nIDEvent == 1601) { @@ -127,7 +127,7 @@ if (pWnd && GetDynamicFreeSpace(m_strDisk, &llFree, NULL)) { TCHAR szData[128]; - pWnd->SetWindowText(GetSizeString(llFree, szData)); + pWnd->SetWindowText(GetSizeString(llFree, szData, 128)); // end dialog if this is enough if (m_llRequired <= llFree) Index: src/ch/NotEnoughRoomDlg.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/NotEnoughRoomDlg.h (.../NotEnoughRoomDlg.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/NotEnoughRoomDlg.h (.../NotEnoughRoomDlg.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -60,7 +60,7 @@ // Generated message map functions //{{AFX_MSG(CNotEnoughRoomDlg) virtual BOOL OnInitDialog(); - afx_msg void OnTimer(UINT nIDEvent); + afx_msg void OnTimer(UINT_PTR nIDEvent); afx_msg void OnRetryButton(); afx_msg void OnIgnoreButton(); //}}AFX_MSG Index: src/ch/OptionsDlg.cpp =================================================================== diff -u -rab4de0cb1ae8f235a0801971ab5b1d26f752ebbb -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/OptionsDlg.cpp (.../OptionsDlg.cpp) (revision ab4de0cb1ae8f235a0801971ab5b1d26f752ebbb) +++ src/ch/OptionsDlg.cpp (.../OptionsDlg.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -358,7 +358,7 @@ { // replace the first part of path with TCHAR szData[_MAX_PATH]; - _stprintf(szData, _T("%s"), pszSrc+_tcslen(GetApp()->GetProgramPath())); + _sntprintf(szData, _MAX_PATH, _T("%s"), pszSrc+_tcslen(GetApp()->GetProgramPath())); GetConfig()->SetStringValue(PP_PLANGUAGE, szData); } else Index: src/ch/ProgressListBox.cpp =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/ProgressListBox.cpp (.../ProgressListBox.cpp) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/ProgressListBox.cpp (.../ProgressListBox.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -196,7 +196,7 @@ if (GetCount() != m_items.GetSize()) { while (GetCount() < m_items.GetSize()) - AddString(""); + AddString(_T("")); while (GetCount() > m_items.GetSize()) DeleteString(m_items.GetSize()); Index: src/ch/PropertyListCtrl.cpp =================================================================== diff -u -re701ed2460c2558eeefab55a1f3ed1d2c89a56c0 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/PropertyListCtrl.cpp (.../PropertyListCtrl.cpp) (revision e701ed2460c2558eeefab55a1f3ed1d2c89a56c0) +++ src/ch/PropertyListCtrl.cpp (.../PropertyListCtrl.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -60,7 +60,7 @@ m_pBlackBrush = new CBrush(GetSysColor(COLOR_BTNTEXT)); // Create the CButton - if( !CButton::Create("", WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON|BS_OWNERDRAW, Rect, pParent, uID )) + if( !CButton::Create(_T(""), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON|BS_OWNERDRAW, Rect, pParent, uID )) return FALSE; return 0; @@ -548,7 +548,7 @@ csExt = csPath.Right(csPath.GetLength() - nPos - 1); // Show the Dialog - CFileDialog QuizFileDlg(TRUE, "*", "*." + csExt, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, m_pCurItem->csProperties.GetAt(1) ); + CFileDialog QuizFileDlg(TRUE, _T("*"), _T("*.") + csExt, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, m_pCurItem->csProperties.GetAt(1) ); QuizFileDlg.m_ofn.lpstrInitialDir = csPath; if(QuizFileDlg.DoModal() != IDOK) return; @@ -1006,7 +1006,7 @@ case ID_PROPERTY_FONT: if(m_pCurDrawItem->LogFont.lfHeight) - pDC->DrawText( m_pCurDrawItem->LogFont.lfFaceName, strlen(m_pCurDrawItem->LogFont.lfFaceName), ItemRect, DT_SINGLELINE|DT_VCENTER|DT_LEFT|DT_NOPREFIX); + pDC->DrawText( m_pCurDrawItem->LogFont.lfFaceName, _tcslen(m_pCurDrawItem->LogFont.lfFaceName), ItemRect, DT_SINGLELINE|DT_VCENTER|DT_LEFT|DT_NOPREFIX); break; } } @@ -1030,7 +1030,7 @@ if(!m_pFontButton) { m_pFontButton = new CButton(); - m_pFontButton->Create("...", WS_CHILD|BS_PUSHBUTTON, CRect(0,0,100,100), this, ID_PROPERTY_FONT); + m_pFontButton->Create(_T("..."), WS_CHILD|BS_PUSHBUTTON, CRect(0,0,100,100), this, ID_PROPERTY_FONT); m_pFontButton->SetFont(m_pTextFont); } break; @@ -1039,7 +1039,7 @@ if(!m_pPathButton) { m_pPathButton = new CButton(); - m_pPathButton->Create("...", WS_CHILD|BS_PUSHBUTTON, CRect(0,0,100,100), this, ID_PROPERTY_PATH); + m_pPathButton->Create(_T("..."), WS_CHILD|BS_PUSHBUTTON, CRect(0,0,100,100), this, ID_PROPERTY_PATH); m_pPathButton->SetFont(m_pTextFont); } break; @@ -1048,7 +1048,7 @@ if(!m_pDirButton) { m_pDirButton = new CButton(); - m_pDirButton->Create("...", WS_CHILD|BS_PUSHBUTTON, CRect(0,0,100,100), this, ID_PROPERTY_DIR); + m_pDirButton->Create(_T("..."), WS_CHILD|BS_PUSHBUTTON, CRect(0,0,100,100), this, ID_PROPERTY_DIR); m_pDirButton->SetFont(m_pTextFont); } break; @@ -1057,7 +1057,7 @@ if(!m_pCustomButton) { m_pCustomButton = new CButton(); - m_pCustomButton->Create("...", WS_CHILD|BS_PUSHBUTTON, CRect(0,0,100,100), this, ID_PROPERTY_CUSTOM); + m_pCustomButton->Create(_T("..."), WS_CHILD|BS_PUSHBUTTON, CRect(0,0,100,100), this, ID_PROPERTY_CUSTOM); m_pCustomButton->SetFont(m_pTextFont); } break; @@ -1127,19 +1127,19 @@ void CPropertyListCtrl::ParseProperties(PROPERTYITEM* pPropertyItem, CString csData) { // Parse the Items - char* pText = csData.GetBuffer( csData.GetLength() ); - char* pWord; - char Separations[] = "!"; + TCHAR* pText = csData.GetBuffer( csData.GetLength() ); + TCHAR* pWord; + TCHAR Separations[] = _T("!"); // Establish string and get the first token: - pWord = strtok( pText, Separations); + pWord = _tcstok( pText, Separations); while( pWord != NULL ) { // Add this to the Array pPropertyItem->csProperties.Add(pWord); // Get next token - pWord = strtok( NULL, Separations ); + pWord = _tcstok( NULL, Separations ); } // Release the buffer Index: src/ch/ReplaceFilesDlg.cpp =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/ReplaceFilesDlg.cpp (.../ReplaceFilesDlg.cpp) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/ReplaceFilesDlg.cpp (.../ReplaceFilesDlg.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -132,7 +132,7 @@ EndDialog(ID_RECOPYALL); } -void CReplaceFilesDlg::OnTimer(UINT nIDEvent) +void CReplaceFilesDlg::OnTimer(UINT_PTR nIDEvent) { if (nIDEvent == 1601) { Index: src/ch/ReplaceFilesDlg.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/ReplaceFilesDlg.h (.../ReplaceFilesDlg.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/ReplaceFilesDlg.h (.../ReplaceFilesDlg.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -64,7 +64,7 @@ afx_msg void OnIgnoreAllButton(); afx_msg void OnRecopyButton(); afx_msg void OnRecopyAllButton(); - afx_msg void OnTimer(UINT nIDEvent); + afx_msg void OnTimer(UINT_PTR nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; Index: src/ch/ReplaceOnlyDlg.cpp =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/ReplaceOnlyDlg.cpp (.../ReplaceOnlyDlg.cpp) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/ReplaceOnlyDlg.cpp (.../ReplaceOnlyDlg.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -120,7 +120,7 @@ EndDialog(ID_RETRY); } -void CReplaceOnlyDlg::OnTimer(UINT nIDEvent) +void CReplaceOnlyDlg::OnTimer(UINT_PTR nIDEvent) { if (nIDEvent == 1601) { Index: src/ch/ReplaceOnlyDlg.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/ReplaceOnlyDlg.h (.../ReplaceOnlyDlg.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/ReplaceOnlyDlg.h (.../ReplaceOnlyDlg.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -62,7 +62,7 @@ afx_msg void OnIgnoreAllButton(); afx_msg void OnWaitButton(); afx_msg void OnRetryButton(); - afx_msg void OnTimer(UINT nIDEvent); + afx_msg void OnTimer(UINT_PTR nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; Index: src/ch/ResourceManager.cpp =================================================================== diff -u -r66e9ad9a512cec46d691cb1ba012424dc7ac8897 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/ResourceManager.cpp (.../ResourceManager.cpp) (revision 66e9ad9a512cec46d691cb1ba012424dc7ac8897) +++ src/ch/ResourceManager.cpp (.../ResourceManager.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -402,7 +402,7 @@ { memset(&mif, 0, sizeof(MENUITEMINFO)); mif.cbSize=sizeof(MENUITEMINFO); - mif.dwTypeData=(LPSTR)szItem; + mif.dwTypeData=szItem; mif.cch=1023; mif.fMask=MIIM_FTYPE | MIIM_SUBMENU | MIIM_ID | MIIM_DATA | MIIM_STRING; if (::GetMenuItemInfo(hMenu, i, TRUE, &mif)) Index: src/ch/ShutdownDlg.cpp =================================================================== diff -u -re701ed2460c2558eeefab55a1f3ed1d2c89a56c0 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/ShutdownDlg.cpp (.../ShutdownDlg.cpp) (revision e701ed2460c2558eeefab55a1f3ed1d2c89a56c0) +++ src/ch/ShutdownDlg.cpp (.../ShutdownDlg.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -77,7 +77,7 @@ return TRUE; } -void CShutdownDlg::OnTimer(UINT nIDEvent) +void CShutdownDlg::OnTimer(UINT_PTR nIDEvent) { if (nIDEvent == 6678) { @@ -98,6 +98,5 @@ void CShutdownDlg::FormatTimeString(int iTime, CString *pstrData) { - _stprintf(pstrData->GetBuffer(32), _T("%lu s."), iTime/1000); - pstrData->ReleaseBuffer(); + pstrData->Format(_T("%lu s."), iTime/1000); } Index: src/ch/ShutdownDlg.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/ShutdownDlg.h (.../ShutdownDlg.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/ShutdownDlg.h (.../ShutdownDlg.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -54,7 +54,7 @@ // Generated message map functions //{{AFX_MSG(CShutdownDlg) virtual BOOL OnInitDialog(); - afx_msg void OnTimer(UINT nIDEvent); + afx_msg void OnTimer(UINT_PTR nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; Index: src/ch/SmallReplaceFilesDlg.cpp =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/SmallReplaceFilesDlg.cpp (.../SmallReplaceFilesDlg.cpp) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/SmallReplaceFilesDlg.cpp (.../SmallReplaceFilesDlg.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -118,7 +118,7 @@ EndDialog(ID_IGNOREALL); } -void CSmallReplaceFilesDlg::OnTimer(UINT nIDEvent) +void CSmallReplaceFilesDlg::OnTimer(UINT_PTR nIDEvent) { if (nIDEvent == 1601) { Index: src/ch/SmallReplaceFilesDlg.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/SmallReplaceFilesDlg.h (.../SmallReplaceFilesDlg.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/SmallReplaceFilesDlg.h (.../SmallReplaceFilesDlg.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -60,7 +60,7 @@ afx_msg void OnRecopyAllButton(); afx_msg void OnIgnoreButton(); afx_msg void OnIgnoreAllButton(); - afx_msg void OnTimer(UINT nIDEvent); + afx_msg void OnTimer(UINT_PTR nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; Index: src/ch/StaticEx.cpp =================================================================== diff -u -r66e9ad9a512cec46d691cb1ba012424dc7ac8897 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/StaticEx.cpp (.../StaticEx.cpp) (revision 66e9ad9a512cec46d691cb1ba012424dc7ac8897) +++ src/ch/StaticEx.cpp (.../StaticEx.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -175,7 +175,7 @@ ::SetWindowOrgEx(hdc, ps.rcPaint.left, ps.rcPaint.top, NULL); // paint the background - ::FillRect(hdc, &ps.rcPaint, (HBRUSH)::SendMessage((HWND)::GetWindowLong(hwnd, GWL_HWNDPARENT), WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd)); + ::FillRect(hdc, &ps.rcPaint, (HBRUSH)::SendMessage((HWND)::GetWindowLong(hwnd, GWLP_HWNDPARENT), WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd)); // size of the all control RECT rcCtl; @@ -291,13 +291,13 @@ { if (::GetWindowLong(hwnd, GWL_STYLE) & SES_NOTIFY) { - ::SendMessage((HWND)::GetWindowLong(hwnd, GWL_HWNDPARENT), WM_COMMAND, (WPARAM)(SEN_CLICKED << 16 | ::GetWindowLong(hwnd, GWL_ID)), (LPARAM)hwnd); + ::SendMessage((HWND)::GetWindowLong(hwnd, GWLP_HWNDPARENT), WM_COMMAND, (WPARAM)(SEN_CLICKED << 16 | ::GetWindowLong(hwnd, GWL_ID)), (LPARAM)hwnd); } else { TRACE("Executing %s...\n", pSettings->pszLink); - ShellExecute(NULL, "open", pSettings->pszLink, NULL, NULL, SW_SHOWNORMAL); + ShellExecute(NULL, _T("open"), pSettings->pszLink, NULL, NULL, SW_SHOWNORMAL); } } pSettings->bDown=false; Index: src/ch/StatusDlg.cpp =================================================================== diff -u -re701ed2460c2558eeefab55a1f3ed1d2c89a56c0 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision e701ed2460c2558eeefab55a1f3ed1d2c89a56c0) +++ src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -207,7 +207,7 @@ } } -void CStatusDlg::OnTimer(UINT nIDEvent) +void CStatusDlg::OnTimer(UINT_PTR nIDEvent) { if (nIDEvent == 777) // refreshing data { @@ -293,33 +293,33 @@ } // count of processed data/overall count of data - _stprintf(m_szData, _T("%d/%d ("), td.m_iIndex, td.m_iSize); + _sntprintf(m_szData, _MAX_PATH, _T("%d/%d ("), td.m_iIndex, td.m_iSize); m_strTemp=CString(m_szData); - m_strTemp+=GetSizeString(td.m_iProcessedSize, m_szData)+CString(_T("/")); - m_strTemp+=GetSizeString(td.m_iSizeAll, m_szData)+CString(_T(")")); - _stprintf(m_szData, _T(" (%s%d/%d)"), GetResManager()->LoadString(IDS_CURRENTPASS_STRING), td.m_ucCurrentCopy, td.m_ucCopies); + m_strTemp+=GetSizeString(td.m_iProcessedSize, m_szData, _MAX_PATH)+CString(_T("/")); + m_strTemp+=GetSizeString(td.m_iSizeAll, m_szData, _MAX_PATH)+CString(_T(")")); + _sntprintf(m_szData, _MAX_PATH, _T(" (%s%d/%d)"), GetResManager()->LoadString(IDS_CURRENTPASS_STRING), td.m_ucCurrentCopy, td.m_ucCopies); m_strTemp+=m_szData; GetDlgItem(IDC_PROGRESS_STATIC)->SetWindowText(m_strTemp); // transfer if (m_i64LastProcessed == 0) // if first time - show average - m_strTemp=GetSizeString( td.m_lTimeElapsed ? td.m_iProcessedSize/td.m_lTimeElapsed : 0, m_szData ); // last avg + m_strTemp=GetSizeString( td.m_lTimeElapsed ? td.m_iProcessedSize/td.m_lTimeElapsed : 0, m_szData, _MAX_PATH); // last avg else if ( (dwCurrentTime-m_dwLastUpdate) != 0) - m_strTemp=GetSizeString( (static_cast(td.m_iProcessedSize) - static_cast(m_i64LastProcessed))/(static_cast(dwCurrentTime-m_dwLastUpdate)/1000.0), m_szData ); + m_strTemp=GetSizeString( (static_cast(td.m_iProcessedSize) - static_cast(m_i64LastProcessed))/(static_cast(dwCurrentTime-m_dwLastUpdate)/1000.0), m_szData, _MAX_PATH); else - m_strTemp=GetSizeString( 0I64, m_szData ); + m_strTemp=GetSizeString( 0I64, m_szData, _MAX_PATH); // avg transfer GetDlgItem(IDC_TRANSFER_STATIC)->SetWindowText(m_strTemp+_T("/s (")+CString(GetResManager()->LoadString(IDS_AVERAGEWORD_STRING)) - +CString(GetSizeString(td.m_lTimeElapsed ? td.m_iProcessedSize/td.m_lTimeElapsed : 0, m_szData))+_T("/s )") + +CString(GetSizeString(td.m_lTimeElapsed ? td.m_iProcessedSize/td.m_lTimeElapsed : 0, m_szData, _MAX_PATH))+_T("/s )") ); // elapsed time/estimated time - FormatTime(td.m_lTimeElapsed, m_szTimeBuffer1); - FormatTime( (td.m_iProcessedSize == 0) ? 0 : static_cast((static_cast<__int64>(td.m_iSizeAll)*static_cast<__int64>(td.m_lTimeElapsed))/td.m_iProcessedSize), m_szTimeBuffer2); + FormatTime(td.m_lTimeElapsed, m_szTimeBuffer1, 40); + FormatTime( (td.m_iProcessedSize == 0) ? 0 : static_cast((static_cast<__int64>(td.m_iSizeAll)*static_cast<__int64>(td.m_lTimeElapsed))/td.m_iProcessedSize), m_szTimeBuffer2, 40); - _stprintf(m_szData, _T("%s / %s"), m_szTimeBuffer1, m_szTimeBuffer2); + _sntprintf(m_szData, _MAX_PATH, _T("%s / %s"), m_szTimeBuffer1, m_szTimeBuffer2); GetDlgItem(IDC_TIME_STATIC)->SetWindowText(m_szData); // remember current processed data (used for calculating transfer) @@ -705,7 +705,7 @@ return 0; } -LPTSTR CStatusDlg::FormatTime(long lSeconds, LPTSTR lpszBuffer) +LPTSTR CStatusDlg::FormatTime(long lSeconds, LPTSTR lpszBuffer, size_t stMaxBufferSize) { long lDays=lSeconds/86400; lSeconds%=86400; @@ -715,12 +715,12 @@ lSeconds%=60; if (lDays != 0) - _stprintf(lpszBuffer, _T("%02d:%02d:%02d:%02d"), lDays, lHours, lMinutes, lSeconds); + _sntprintf(lpszBuffer, stMaxBufferSize, _T("%02d:%02d:%02d:%02d"), lDays, lHours, lMinutes, lSeconds); else if (lHours != 0) - _stprintf(lpszBuffer, _T("%02d:%02d:%02d"), lHours, lMinutes, lSeconds); + _sntprintf(lpszBuffer, stMaxBufferSize, _T("%02d:%02d:%02d"), lHours, lMinutes, lSeconds); else - _stprintf(lpszBuffer, _T("%02d:%02d"), lMinutes, lSeconds); + _sntprintf(lpszBuffer, stMaxBufferSize, _T("%02d:%02d"), lMinutes, lSeconds); return lpszBuffer; } @@ -745,9 +745,9 @@ // set title if (m_pTasks->GetSize() != 0) - _stprintf(m_szData, _T("%s [%d %%]"), GetResManager()->LoadString(IDS_STATUSTITLE_STRING), m_pTasks->GetPercent()); + _sntprintf(m_szData, _MAX_PATH, _T("%s [%d %%]"), GetResManager()->LoadString(IDS_STATUSTITLE_STRING), m_pTasks->GetPercent()); else - _tcscpy(m_szData, GetResManager()->LoadString(IDS_STATUSTITLE_STRING)); + _sntprintf(m_szData, _MAX_PATH, _T("%s"), GetResManager()->LoadString(IDS_STATUSTITLE_STRING)); // if changed GetWindowText(m_strTemp); @@ -760,18 +760,18 @@ m_ctlProgressAll.SetPos(nPercent); // progress - count of processed data/count of data - m_strTemp=GetSizeString(m_pTasks->GetPosition(), m_szData)+CString(_T("/")); - m_strTemp+=GetSizeString(m_pTasks->GetRange(), m_szData); + m_strTemp=GetSizeString(m_pTasks->GetPosition(), m_szData, _MAX_PATH)+CString(_T("/")); + m_strTemp+=GetSizeString(m_pTasks->GetRange(), m_szData, _MAX_PATH); GetDlgItem(IDC_OVERALL_PROGRESS_STATIC)->SetWindowText(m_strTemp); // transfer if (m_i64LastAllTasksProcessed == 0) m_i64LastAllTasksProcessed=m_pTasks->GetPosition(); if (dwCurrentTime-m_dwLastUpdate != 0) - m_strTemp=GetSizeString( (static_cast(m_pTasks->GetPosition()) - static_cast(m_i64LastAllTasksProcessed))/static_cast(static_cast(dwCurrentTime-m_dwLastUpdate)/1000.0), m_szData ); + m_strTemp=GetSizeString( (static_cast(m_pTasks->GetPosition()) - static_cast(m_i64LastAllTasksProcessed))/static_cast(static_cast(dwCurrentTime-m_dwLastUpdate)/1000.0), m_szData, _MAX_PATH); else - m_strTemp=GetSizeString( 0I64, m_szData ); + m_strTemp=GetSizeString( 0I64, m_szData, _MAX_PATH); GetDlgItem(IDC_OVERALL_TRANSFER_STATIC)->SetWindowText(m_strTemp+_T("/s")); m_i64LastAllTasksProcessed=m_pTasks->GetPosition(); @@ -878,7 +878,7 @@ if (lResult < 32) { CString str=CString(szExec)+pTask->GetUniqueName()+_T(".log"); - _stprintf(szExec, GetResManager()->LoadString(IDS_SHELLEXECUTEERROR_STRING), lResult, str); + _sntprintf(szExec, 1024, GetResManager()->LoadString(IDS_SHELLEXECUTEERROR_STRING), lResult, str); AfxMessageBox(szExec); } } @@ -920,7 +920,7 @@ break; } - _tcscat(szData, GetSizeString((__int64)uiValue, m_szData)); + _tcscat(szData, GetSizeString((__int64)uiValue, m_szData, _MAX_PATH)); GetDlgItem(IDC_BUFFERSIZE_STATIC)->SetWindowText(szData); } Index: src/ch/StatusDlg.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/StatusDlg.h (.../StatusDlg.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/StatusDlg.h (.../StatusDlg.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -37,7 +37,7 @@ void PostCloseMessage(); void SetBufferSizesString(UINT uiValue, int iIndex); void RefreshStatus(); - LPTSTR FormatTime(long lSeconds, LPTSTR lpszBuffer); + LPTSTR FormatTime(long lSeconds, LPTSTR lpszBuffer, size_t stMaxBufferSize); int GetImageFromStatus(UINT nStatus); void ApplyButtonsState(); @@ -95,7 +95,7 @@ // Generated message map functions //{{AFX_MSG(CStatusDlg) virtual BOOL OnInitDialog(); - afx_msg void OnTimer(UINT nIDEvent); + afx_msg void OnTimer(UINT_PTR nIDEvent); afx_msg void OnPauseButton(); afx_msg void OnCancelButton(); afx_msg void OnRollUnrollButton(); Index: src/ch/StringHelpers.cpp =================================================================== diff -u -re701ed2460c2558eeefab55a1f3ed1d2c89a56c0 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/StringHelpers.cpp (.../StringHelpers.cpp) (revision e701ed2460c2558eeefab55a1f3ed1d2c89a56c0) +++ src/ch/StringHelpers.cpp (.../StringHelpers.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -42,36 +42,36 @@ } #endif -LPTSTR GetSizeString(double dData, LPTSTR pszBuffer) +LPTSTR GetSizeString(double dData, LPTSTR pszBuffer, size_t stMaxBufferSize) { if (dData < 0.0) dData=0.0; if (dData < 1200.0) - _stprintf(pszBuffer, _T("%.2f %s"), dData, GetResManager()->LoadString(IDS_BYTE_STRING)); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), dData, GetResManager()->LoadString(IDS_BYTE_STRING)); else if (dData < 1228800.0) - _stprintf(pszBuffer, _T("%.2f %s"), static_cast(dData)/1024.0, GetResManager()->LoadString(IDS_KBYTE_STRING)); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), static_cast(dData)/1024.0, GetResManager()->LoadString(IDS_KBYTE_STRING)); else if (dData < 1258291200.0) - _stprintf(pszBuffer, _T("%.2f %s"), static_cast(dData)/1048576.0, GetResManager()->LoadString(IDS_MBYTE_STRING)); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), static_cast(dData)/1048576.0, GetResManager()->LoadString(IDS_MBYTE_STRING)); else - _stprintf(pszBuffer, _T("%.2f %s"), static_cast(dData)/1073741824.0, GetResManager()->LoadString(IDS_GBYTE_STRING)); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), static_cast(dData)/1073741824.0, GetResManager()->LoadString(IDS_GBYTE_STRING)); return pszBuffer; } -LPTSTR GetSizeString(__int64 llData, LPTSTR pszBuffer, bool bStrict) +LPTSTR GetSizeString(__int64 llData, LPTSTR pszBuffer, size_t stMaxBufferSize, bool bStrict) { if (llData < 0) llData=0; if (llData >= 1258291200 && (!bStrict || (llData % 1073741824) == 0)) - _stprintf(pszBuffer, _T("%.2f %s"), (double)(llData/1073741824.0), GetResManager()->LoadString(IDS_GBYTE_STRING)); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), (double)(llData/1073741824.0), GetResManager()->LoadString(IDS_GBYTE_STRING)); else if (llData >= 1228800 && (!bStrict || (llData % 1048576) == 0)) - _stprintf(pszBuffer, _T("%.2f %s"), (double)(llData/1048576.0), GetResManager()->LoadString(IDS_MBYTE_STRING)); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), (double)(llData/1048576.0), GetResManager()->LoadString(IDS_MBYTE_STRING)); else if (llData >= 1200 && (!bStrict || (llData % 1024) == 0)) - _stprintf(pszBuffer, _T("%.2f %s"), (double)(llData/1024.0), GetResManager()->LoadString(IDS_KBYTE_STRING)); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), (double)(llData/1024.0), GetResManager()->LoadString(IDS_KBYTE_STRING)); else - _stprintf(pszBuffer, _T("%I64u %s"), llData, GetResManager()->LoadString(IDS_BYTE_STRING)); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%I64u %s"), llData, GetResManager()->LoadString(IDS_BYTE_STRING)); return pszBuffer; } Index: src/ch/StringHelpers.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/StringHelpers.h (.../StringHelpers.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/StringHelpers.h (.../StringHelpers.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -25,7 +25,7 @@ void ExpandFormatString(CString* pstrFmt, DWORD dwError); #endif -LPTSTR GetSizeString(double dData, LPTSTR pszBuffer); -LPTSTR GetSizeString(__int64 llData, LPTSTR pszBuffer, bool bStrict=false); +LPTSTR GetSizeString(double dData, LPTSTR pszBuffer, size_t stMaxBufferSize); +LPTSTR GetSizeString(__int64 llData, LPTSTR pszBuffer, size_t stMaxBufferSize, bool bStrict=false); #endif Index: src/ch/Theme Helpers.cpp =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/Theme Helpers.cpp (.../Theme Helpers.cpp) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/Theme Helpers.cpp (.../Theme Helpers.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -39,7 +39,7 @@ { ASSERT(m_hThemesDll); - PFNOPENTHEMEDATA pfnProc=(PFNOPENTHEMEDATA)GetProcAddress(m_hThemesDll, _T("OpenThemeData")); + PFNOPENTHEMEDATA pfnProc=(PFNOPENTHEMEDATA)GetProcAddress(m_hThemesDll, "OpenThemeData"); if (pfnProc) return (*pfnProc)(hwnd, pszClassList); @@ -51,7 +51,7 @@ { ASSERT(m_hThemesDll); - PFNCLOSETHEMEDATA pfnProc=(PFNCLOSETHEMEDATA)GetProcAddress(m_hThemesDll, _T("CloseThemeData")); + PFNCLOSETHEMEDATA pfnProc=(PFNCLOSETHEMEDATA)GetProcAddress(m_hThemesDll, "CloseThemeData"); if (pfnProc) return (*pfnProc)(hTheme); @@ -63,7 +63,7 @@ { ASSERT(m_hThemesDll); - PFNDRAWTHEMEEDGE pfnProc=(PFNDRAWTHEMEEDGE)GetProcAddress(m_hThemesDll, _T("DrawThemeEdge")); + PFNDRAWTHEMEEDGE pfnProc=(PFNDRAWTHEMEEDGE)GetProcAddress(m_hThemesDll, "DrawThemeEdge"); if (pfnProc) return (*pfnProc)(hTheme, hdc, iPartId, iStateId, pDestRect, uEdge, uFlags, pContentRect); @@ -75,7 +75,7 @@ { ASSERT(m_hThemesDll); - PFNDRAWTHEMEBACKGROUND pfnProc=(PFNDRAWTHEMEBACKGROUND)GetProcAddress(m_hThemesDll, _T("DrawThemeBackground")); + PFNDRAWTHEMEBACKGROUND pfnProc=(PFNDRAWTHEMEBACKGROUND)GetProcAddress(m_hThemesDll, "DrawThemeBackground"); if (pfnProc) return (*pfnProc)(hTheme, hdc, iPartId, iStateId, pRect, pClipRect); @@ -87,7 +87,7 @@ { ASSERT(m_hThemesDll); - PFNDRAWTHEMEPARENTBACKGROUND pfnProc=(PFNDRAWTHEMEPARENTBACKGROUND)GetProcAddress(m_hThemesDll, _T("DrawThemeParentBackground")); + PFNDRAWTHEMEPARENTBACKGROUND pfnProc=(PFNDRAWTHEMEPARENTBACKGROUND)GetProcAddress(m_hThemesDll, "DrawThemeParentBackground"); if (pfnProc) return (*pfnProc)(hwnd, hdc, prc); @@ -99,7 +99,7 @@ { ASSERT(m_hThemesDll); - PFNISAPPTHEMED pfnProc=(PFNISAPPTHEMED)GetProcAddress(m_hThemesDll, _T("IsAppThemed")); + PFNISAPPTHEMED pfnProc=(PFNISAPPTHEMED)GetProcAddress(m_hThemesDll, "IsAppThemed"); if (pfnProc) return (*pfnProc)(); Index: src/ch/ch.cpp =================================================================== diff -u -r7eeed050f9517138ba18670a1112119921975c1e -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/ch.cpp (.../ch.cpp) (revision 7eeed050f9517138ba18670a1112119921975c1e) +++ src/ch/ch.cpp (.../ch.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -225,7 +225,7 @@ if (!m_resManager.SetLanguage(ExpandPath(szPath))) { TCHAR szData[2048]; - _stprintf(szData, _T("Couldn't find the language file specified in configuration file:\n%s\nPlease correct this path to point the language file to use.\nProgram will now exit."), szPath); + _sntprintf(szData, 2048, _T("Couldn't find the language file specified in configuration file:\n%s\nPlease correct this path to point the language file to use.\nProgram will now exit."), szPath); AfxMessageBox(szData, MB_ICONSTOP | MB_OK); return FALSE; } @@ -282,7 +282,7 @@ } } -void CCopyHandlerApp::OnResManNotify(UINT uiType, LPARAM lParam) +void CCopyHandlerApp::OnResManNotify(UINT uiType, LPARAM /*lParam*/) { if (uiType == RMNT_LANGCHANGE) { @@ -292,7 +292,7 @@ } } -HWND CCopyHandlerApp::HHelp(HWND hwndCaller, LPCSTR pszFile, UINT uCommand, DWORD dwData) +HWND CCopyHandlerApp::HHelp(HWND hwndCaller, LPCTSTR pszFile, UINT uCommand, DWORD dwData) { PCTSTR pszPath=NULL; WIN32_FIND_DATA wfd; @@ -353,7 +353,7 @@ hhp.pszFont=_T("Tahoma, 8, , "); TCHAR szPath[_MAX_PATH]; - _stprintf(szPath, _T("::/%lu.txt"), (pHelp->dwContextId >> 16) & 0x7fff); + _sntprintf(szPath, _MAX_PATH, _T("::/%lu.txt"), (pHelp->dwContextId >> 16) & 0x7fff); return (HHelp(GetDesktopWindow(), szPath, HH_DISPLAY_TEXT_POPUP, (DWORD)&hhp) != NULL); break; Index: src/ch/ch.h =================================================================== diff -u -r66e9ad9a512cec46d691cb1ba012424dc7ac8897 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/ch.h (.../ch.h) (revision 66e9ad9a512cec46d691cb1ba012424dc7ac8897) +++ src/ch/ch.h (.../ch.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -72,7 +72,7 @@ void OnResManNotify(UINT uiType, LPARAM lParam); protected: bool UpdateHelpPaths(); - HWND HHelp(HWND hwndCaller, LPCSTR pszFile, UINT uCommand, DWORD dwData); + HWND HHelp(HWND hwndCaller, LPCTSTR pszFile, UINT uCommand, DWORD dwData); public: CResourceManager m_resManager; Index: src/ch/ch.vc90.vcproj =================================================================== diff -u -re3bcaae8d754c3ebbbb41df8426a60891f5fdf6d -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/ch.vc90.vcproj (.../ch.vc90.vcproj) (revision e3bcaae8d754c3ebbbb41df8426a60891f5fdf6d) +++ src/ch/ch.vc90.vcproj (.../ch.vc90.vcproj) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -12,14 +12,17 @@ + @@ -76,13 +77,14 @@ @@ -164,12 +168,14 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -245,6 +794,66 @@ Outputs="$(OutDir)\$(InputName).res" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - Index: src/ch/debug.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/ch/debug.h (.../debug.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/ch/debug.h (.../debug.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -29,7 +29,7 @@ ////////////////////////////////////// -#define GEN_PAIR(str) { str, #str } +#define GEN_PAIR(str) { str, _T(#str) } static __dbg_msg__ __msgs__[] = { GEN_PAIR(WM_NULL), @@ -80,7 +80,7 @@ GEN_PAIR(WM_GETHOTKEY), GEN_PAIR(WM_QUERYDRAGICON), GEN_PAIR(WM_COMPAREITEM), - { 0x003d, "WM_GETOBJECT" }, + { 0x003d, _T("WM_GETOBJECT") }, GEN_PAIR(WM_COMPACTING), GEN_PAIR(WM_COMMNOTIFY), GEN_PAIR(WM_WINDOWPOSCHANGING), @@ -119,10 +119,10 @@ GEN_PAIR(WM_NCMBUTTONDOWN), GEN_PAIR(WM_NCMBUTTONUP), GEN_PAIR(WM_NCMBUTTONDBLCLK), - { 0x00AB, "WM_NCXBUTTONDOWN" }, - { 0x00AC, "WM_NCXBUTTONUP" }, - { 0x00AD, "WM_NCXBUTTONDBLCLK" }, - { 0x00FF, "WM_INPUT" }, + { 0x00AB, _T("WM_NCXBUTTONDOWN") }, + { 0x00AC, _T("WM_NCXBUTTONUP") }, + { 0x00AD, _T("WM_NCXBUTTONDBLCLK") }, + { 0x00FF, _T("WM_INPUT") }, GEN_PAIR(WM_KEYFIRST), GEN_PAIR(WM_KEYDOWN), GEN_PAIR(WM_KEYUP), @@ -149,14 +149,14 @@ GEN_PAIR(WM_MENUSELECT), GEN_PAIR(WM_MENUCHAR), GEN_PAIR(WM_ENTERIDLE), - { 0x0122, "WM_MENURBUTTONUP" }, - { 0x0123, "WM_MENUDRAG" }, - { 0x0124, "WM_MENUGETOBJECT" }, - { 0x0125, "WM_UNINITMENUPOPUP" }, - { 0x0126, "WM_MENUCOMMAND" }, - { 0x0127, "WM_CHANGEUISTATE" }, - { 0x0128, "WM_UPDATEUISTATE" }, - { 0x0129, "WM_QUERYUISTATE" }, + { 0x0122, _T("WM_MENURBUTTONUP") }, + { 0x0123, _T("WM_MENUDRAG") }, + { 0x0124, _T("WM_MENUGETOBJECT") }, + { 0x0125, _T("WM_UNINITMENUPOPUP") }, + { 0x0126, _T("WM_MENUCOMMAND") }, + { 0x0127, _T("WM_CHANGEUISTATE") }, + { 0x0128, _T("WM_UPDATEUISTATE") }, + { 0x0129, _T("WM_QUERYUISTATE") }, GEN_PAIR(WM_CTLCOLORMSGBOX), GEN_PAIR(WM_CTLCOLOREDIT), GEN_PAIR(WM_CTLCOLORLISTBOX), @@ -176,9 +176,9 @@ GEN_PAIR(WM_MBUTTONUP), GEN_PAIR(WM_MBUTTONDBLCLK), GEN_PAIR(WM_MOUSEWHEEL), - { 0x020B, "WM_XBUTTONDOWN" }, - { 0x020C, "WM_XBUTTONUP" }, - { 0x020D, "WM_XBUTTONDBLCLK" }, + { 0x020B, _T("WM_XBUTTONDOWN") }, + { 0x020C, _T("WM_XBUTTONUP") }, + { 0x020D, _T("WM_XBUTTONDBLCLK") }, GEN_PAIR(WM_MOUSELAST), GEN_PAIR(WM_MOUSELAST), GEN_PAIR(WM_MOUSELAST), @@ -212,16 +212,16 @@ GEN_PAIR(WM_IME_COMPOSITIONFULL), GEN_PAIR(WM_IME_SELECT), GEN_PAIR(WM_IME_CHAR), - { 0x0288, "WM_IME_REQUEST" }, + { 0x0288, _T("WM_IME_REQUEST") }, GEN_PAIR(WM_IME_KEYDOWN), GEN_PAIR(WM_IME_KEYUP), GEN_PAIR(WM_MOUSEHOVER), GEN_PAIR(WM_MOUSELEAVE), - { 0x02A0, "WM_NCMOUSEHOVER" }, - { 0x02A2, "WM_NCMOUSELEAVE" }, - { 0x02B1, "WM_WTSSESSION_CHANGE" }, - { 0x02C0, "WM_TABLET_FIRST" }, - { 0x02DF, "WM_TABLET_LAST" }, + { 0x02A0, _T("WM_NCMOUSEHOVER") }, + { 0x02A2, _T("WM_NCMOUSELEAVE") }, + { 0x02B1, _T("WM_WTSSESSION_CHANGE") }, + { 0x02C0, _T("WM_TABLET_FIRST") }, + { 0x02DF, _T("WM_TABLET_LAST") }, GEN_PAIR(WM_CUT), GEN_PAIR(WM_COPY), GEN_PAIR(WM_PASTE), @@ -243,8 +243,8 @@ GEN_PAIR(WM_HOTKEY), GEN_PAIR(WM_PRINT), GEN_PAIR(WM_PRINTCLIENT), - { 0x0319, "WM_APPCOMMAND" }, - { 0x031A, "WM_THEMECHANGED" }, + { 0x0319, _T("WM_APPCOMMAND") }, + { 0x031A, _T("WM_THEMECHANGED") }, GEN_PAIR(WM_HANDHELDFIRST), GEN_PAIR(WM_HANDHELDLAST), GEN_PAIR(WM_AFXFIRST), @@ -256,22 +256,23 @@ }; ///////////////////////////////// -static char* UINTToMsg(UINT uiMsg, char* szBuffer) +static TCHAR* UINTToMsg(UINT uiMsg, TCHAR* szBuffer, size_t stMaxBufferSize) { - int iCount=sizeof(__msgs__)/(sizeof(UINT)+sizeof(char*)); + int iCount=sizeof(__msgs__)/(sizeof(__dbg_msg__)); for (int i=0;i(pszName), A2W(pCommand[idCmd].szDesc), cchMax); - break; + { + CT2W ct2w(pCommand[idCmd].szDesc); + wcsncpy(reinterpret_cast(pszName), ct2w, cchMax); + break; + } default: wcsncpy(reinterpret_cast(pszName), L"", cchMax); break; @@ -148,8 +151,11 @@ case 0: case 1: case 2: - strncpy(pszName, pCommand[idCmd].szDesc, cchMax); - break; + { + CT2A ct2a(pCommand[idCmd].szDesc); + strncpy(pszName, ct2a, cchMax); + break; + } default: strncpy(pszName, "", cchMax); break; Index: src/chext/DropMenuExt.h =================================================================== diff -u -r47da0c5883b1bf97972b1bcd3dc70b2d64024969 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/chext/DropMenuExt.h (.../DropMenuExt.h) (revision 47da0c5883b1bf97972b1bcd3dc70b2d64024969) +++ src/chext/DropMenuExt.h (.../DropMenuExt.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -75,7 +75,7 @@ public: STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici); STDMETHOD(Initialize)(LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY /*hkeyProgID*/); - STDMETHOD(GetCommandString)(UINT idCmd, UINT uFlags, UINT* /*pwReserved*/, LPSTR pszName, UINT cchMax); + STDMETHOD(GetCommandString)(UINT_PTR idCmd, UINT uFlags, UINT* /*pwReserved*/, LPSTR pszName, UINT cchMax); STDMETHOD(QueryContextMenu)(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT /*idCmdLast*/, UINT uFlags); }; Index: src/chext/MenuExt.cpp =================================================================== diff -u -re701ed2460c2558eeefab55a1f3ed1d2c89a56c0 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/chext/MenuExt.cpp (.../MenuExt.cpp) (revision e701ed2460c2558eeefab55a1f3ed1d2c89a56c0) +++ src/chext/MenuExt.cpp (.../MenuExt.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -352,7 +352,7 @@ // modify text if (g_pscsShared->bShowFreeSpace && GetDynamicFreeSpace(pShortcuts[i].szPath, &iiFree, NULL)) { - _stprintf(szText, _T("%s (%s)"), pShortcuts[i].szName, GetSizeString(iiFree, szSize)); + _sntprintf(szText, 256, _T("%s (%s)"), pShortcuts[i].szName, GetSizeString(iiFree, szSize, 32)); _tcsncpy(pShortcuts[i].szName, szText, 127); // OTF("Text to display=%s\r\n", pShortcuts[i].szName); pShortcuts[i].szName[127]=_T('\0'); @@ -364,7 +364,7 @@ } } -STDMETHODIMP CMenuExt::GetCommandString(UINT idCmd, UINT uFlags, UINT* /*pwReserved*/, LPSTR pszName, UINT cchMax) +STDMETHODIMP CMenuExt::GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT* /*pwReserved*/, LPSTR pszName, UINT cchMax) { if (uFlags == GCS_HELPTEXTW) { @@ -384,12 +384,18 @@ case 2: case 3: case 4: - wcsncpy(reinterpret_cast(pszName), A2W(pCommand[idCmd].szDesc), cchMax); - break; + { + CT2W ct2w(pCommand[idCmd].szDesc); + wcsncpy(reinterpret_cast(pszName), ct2w, cchMax); + break; + } default: _SHORTCUT* pShortcuts=(_SHORTCUT*)(g_pscsShared->szData+g_pscsShared->iCommandCount*sizeof(_COMMAND)); if ((int)(idCmd-5) < g_pscsShared->iShortcutsCount*3) - wcsncpy(reinterpret_cast(pszName), A2W(pShortcuts[(idCmd-5)%g_pscsShared->iShortcutsCount].szPath), cchMax); + { + CT2W ct2w(pShortcuts[(idCmd-5)%g_pscsShared->iShortcutsCount].szPath); + wcsncpy(reinterpret_cast(pszName), ct2w, cchMax); + } else wcsncpy(reinterpret_cast(pszName), L"", cchMax); } @@ -412,12 +418,18 @@ case 2: case 3: case 4: - strncpy(pszName, pCommand[idCmd].szDesc, cchMax); - break; + { + CT2A ct2a(pCommand[idCmd].szDesc); + strncpy(reinterpret_cast(pszName), ct2a, cchMax); + break; + } default: // rest of commands _SHORTCUT* pShortcuts=(_SHORTCUT*)(g_pscsShared->szData+g_pscsShared->iCommandCount*sizeof(_COMMAND)); if ((int)(idCmd-5) < g_pscsShared->iShortcutsCount*3) - strncpy(pszName, pShortcuts[(idCmd-5)%g_pscsShared->iShortcutsCount].szPath, cchMax); + { + CT2A ct2a(pShortcuts[(idCmd-5)%g_pscsShared->iShortcutsCount].szPath); + strncpy(pszName, ct2a, cchMax); + } else strncpy(pszName, "", cchMax); } @@ -526,7 +538,7 @@ // get data OpenClipboard(lpici->hwnd); HANDLE handle=GetClipboardData(CF_HDROP); - char *pchBuffer=NULL; + TCHAR *pchBuffer=NULL; UINT uiSize; GetDataFromClipboard(static_cast(handle), m_szDstPath, &pchBuffer, &uiSize); @@ -594,7 +606,7 @@ // send message ::SendMessage(hWnd, WM_COPYDATA, reinterpret_cast(lpici->hwnd), reinterpret_cast(&cds)); - // delete bufor + // delete buffer delete [] pszBuffer; m_bBuffer.Destroy(); } Index: src/chext/MenuExt.h =================================================================== diff -u -r47da0c5883b1bf97972b1bcd3dc70b2d64024969 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/chext/MenuExt.h (.../MenuExt.h) (revision 47da0c5883b1bf97972b1bcd3dc70b2d64024969) +++ src/chext/MenuExt.h (.../MenuExt.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -79,7 +79,7 @@ bool m_bGroupFiles; // if the group of files have a files in it UINT m_uiFirstID; // first menu ID - bool m_bShown; // have the menu been already shown ?czy pokazano ju� menu + bool m_bShown; // have the menu been already shown ? DECLARE_REGISTRY_RESOURCEID(IDR_MENUEXT) DECLARE_NOT_AGGREGATABLE(CMenuExt) @@ -100,7 +100,7 @@ public: STDMETHOD(Initialize)(LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY /*hkeyProgID*/); STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici); - STDMETHOD(GetCommandString)(UINT idCmd, UINT uFlags, UINT* /*pwReserved*/, LPSTR pszName, UINT cchMax); + STDMETHOD(GetCommandString)(UINT_PTR idCmd, UINT uFlags, UINT* /*pwReserved*/, LPSTR pszName, UINT cchMax); STDMETHOD(QueryContextMenu)(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT /*idCmdLast*/, UINT /*uFlags*/); STDMETHOD(HandleMenuMsg)(UINT uMsg, WPARAM wParam, LPARAM lParam); STDMETHOD(HandleMenuMsg2)(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* plResult); Index: src/chext/StringHelpers.cpp =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/chext/StringHelpers.cpp (.../StringHelpers.cpp) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/chext/StringHelpers.cpp (.../StringHelpers.cpp) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -21,19 +21,19 @@ #include "StringHelpers.h" #include "stdio.h" -LPTSTR GetSizeString(double dData, LPTSTR pszBuffer) +LPTSTR GetSizeString(double dData, LPTSTR pszBuffer, size_t stMaxBufferSize) { if (dData < 0.0) dData=0.0; if (dData < 1200.0) - _stprintf(pszBuffer, _T("%.2f %s"), dData, g_pscsShared->szSizes[0]); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), dData, g_pscsShared->szSizes[0]); else if (dData < 1228800.0) - _stprintf(pszBuffer, _T("%.2f %s"), static_cast(dData)/1024.0, g_pscsShared->szSizes[1]); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), static_cast(dData)/1024.0, g_pscsShared->szSizes[1]); else if (dData < 1258291200.0) - _stprintf(pszBuffer, _T("%.2f %s"), static_cast(dData)/1048576.0, g_pscsShared->szSizes[2]); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), static_cast(dData)/1048576.0, g_pscsShared->szSizes[2]); else - _stprintf(pszBuffer, _T("%.2f %s"), static_cast(dData)/1073741824.0, g_pscsShared->szSizes[3]); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), static_cast(dData)/1073741824.0, g_pscsShared->szSizes[3]); return pszBuffer; } Index: src/chext/StringHelpers.h =================================================================== diff -u -r3493e9fc470285b0a0b417d50be281467a071eb7 -r4c272b19c74694c428c943011f279ec064fbd894 --- src/chext/StringHelpers.h (.../StringHelpers.h) (revision 3493e9fc470285b0a0b417d50be281467a071eb7) +++ src/chext/StringHelpers.h (.../StringHelpers.h) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -24,31 +24,31 @@ extern CSharedConfigStruct* g_pscsShared; -LPTSTR GetSizeString(double dData, LPTSTR pszBuffer); +LPTSTR GetSizeString(double dData, LPTSTR pszBuffer, size_t stMaxBufferSize); -template LPTSTR GetSizeString(T tData, LPTSTR pszBuffer, bool bStrict=false) +template LPTSTR GetSizeString(T tData, LPTSTR pszBuffer, size_t stMaxBufferSize, bool bStrict=false) { if (tData < 0) tData=0; if (tData >= 1258291200 && (!bStrict || (tData % 1073741824) == 0)) { - _stprintf(pszBuffer, _T("%.2f %s"), static_cast(tData)/1073741824.0, g_pscsShared->szSizes[3]); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), static_cast(tData)/1073741824.0, g_pscsShared->szSizes[3]); return pszBuffer; } else if (tData >= 1228800 && (!bStrict || (tData % 1048576) == 0)) { - _stprintf(pszBuffer, _T("%.2f %s"), static_cast(tData)/1048576.0, g_pscsShared->szSizes[2]); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), static_cast(tData)/1048576.0, g_pscsShared->szSizes[2]); return pszBuffer; } else if (tData >= 1200 && (!bStrict || (tData % 1024) == 0)) { - _stprintf(pszBuffer, _T("%.2f %s"), static_cast(tData)/1024.0, g_pscsShared->szSizes[1]); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%.2f %s"), static_cast(tData)/1024.0, g_pscsShared->szSizes[1]); return pszBuffer; } else { - _stprintf(pszBuffer, _T("%d %s"), tData, g_pscsShared->szSizes[0]); + _sntprintf(pszBuffer, stMaxBufferSize, _T("%d %s"), tData, g_pscsShared->szSizes[0]); return pszBuffer; } } Index: src/chext/chext.vc90.vcproj =================================================================== diff -u -re3bcaae8d754c3ebbbb41df8426a60891f5fdf6d -r4c272b19c74694c428c943011f279ec064fbd894 --- src/chext/chext.vc90.vcproj (.../chext.vc90.vcproj) (revision e3bcaae8d754c3ebbbb41df8426a60891f5fdf6d) +++ src/chext/chext.vc90.vcproj (.../chext.vc90.vcproj) (revision 4c272b19c74694c428c943011f279ec064fbd894) @@ -12,14 +12,17 @@ + @@ -68,13 +73,14 @@ RegisterOutput="false" IgnoreImportLibrary="true" AdditionalDependencies="comctl32.lib" + OutputFile="$(OutDir)\chext.dll" LinkIncremental="1" SuppressStartupBanner="true" ModuleDefinitionFile="chext.def" GenerateDebugInformation="true" SubSystem="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" + RandomizedBaseAddress="2" + DataExecutionPrevention="2" TargetMachine="1" /> @@ -153,12 +161,14 @@ RegisterOutput="false" IgnoreImportLibrary="true" AdditionalDependencies="comctl32.lib" + OutputFile="$(OutDir)\chext.dll" LinkIncremental="1" SuppressStartupBanner="true" ModuleDefinitionFile="chext.def" + GenerateDebugInformation="true" SubSystem="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" + RandomizedBaseAddress="2" + DataExecutionPrevention="2" TargetMachine="1" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -224,6 +760,72 @@ InterfaceIdentifierFileName="chext_i.c" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +