mirror of
				https://github.com/bobranten/Ext4Fsd.git
				synced 2025-10-30 21:38:31 -05:00 
			
		
		
		
	Updated Ext2Mgr to build for 64-bit
This commit is contained in:
		| @@ -127,7 +127,7 @@ void WINAPI ManagerCtrlService(DWORD ctrlcode) | |||||||
| VOID __cdecl | VOID __cdecl | ||||||
| ManagerStartMain(VOID * arg) | ManagerStartMain(VOID * arg) | ||||||
| { | { | ||||||
|     BOOL isService = (BOOL) arg; |     BOOL isService = arg != 0; | ||||||
|     CExt2MgrDlg* dlg = (CExt2MgrDlg*)theApp.m_pMainWnd; |     CExt2MgrDlg* dlg = (CExt2MgrDlg*)theApp.m_pMainWnd; | ||||||
|  |  | ||||||
|     if (dlg) { |     if (dlg) { | ||||||
|   | |||||||
| @@ -48,7 +48,7 @@ protected: | |||||||
| 	afx_msg void OnPaint(); | 	afx_msg void OnPaint(); | ||||||
| 	afx_msg void OnExt2fsd(); | 	afx_msg void OnExt2fsd(); | ||||||
| 	afx_msg void OnDonate(); | 	afx_msg void OnDonate(); | ||||||
| 	afx_msg void OnTimer(UINT nIDEvent); | 	afx_msg void OnTimer(UINT_PTR nIDEvent); | ||||||
| 	//}}AFX_MSG | 	//}}AFX_MSG | ||||||
| 	DECLARE_MESSAGE_MAP() | 	DECLARE_MESSAGE_MAP() | ||||||
|  |  | ||||||
| @@ -176,7 +176,7 @@ void CAboutDlg::OnDonate() | |||||||
| 	GetParent()->SendMessage(WM_COMMAND, ID_DONATE); | 	GetParent()->SendMessage(WM_COMMAND, ID_DONATE); | ||||||
| } | } | ||||||
|  |  | ||||||
| void CAboutDlg::OnTimer(UINT nIDEvent)  | void CAboutDlg::OnTimer(UINT_PTR nIDEvent)  | ||||||
| { | { | ||||||
| 	// TODO: Add your message handler code here and/or call default | 	// TODO: Add your message handler code here and/or call default | ||||||
| 	 | 	 | ||||||
| @@ -597,7 +597,7 @@ void CExt2MgrDlg::OnSysCommand(UINT nID, LPARAM lParam) | |||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
| BOOL CExt2MgrDlg::OnDeviceChange(UINT nEventType, DWORD dwData) | BOOL CExt2MgrDlg::OnDeviceChange(UINT nEventType, DWORD_PTR dwData) | ||||||
| { | { | ||||||
|     PDEV_BROADCAST_HDR lpdb = (PDEV_BROADCAST_HDR)dwData; |     PDEV_BROADCAST_HDR lpdb = (PDEV_BROADCAST_HDR)dwData; | ||||||
|     PDEV_BROADCAST_DEVICEINTERFACE pdbch = (PDEV_BROADCAST_DEVICEINTERFACE)dwData; |     PDEV_BROADCAST_DEVICEINTERFACE pdbch = (PDEV_BROADCAST_DEVICEINTERFACE)dwData; | ||||||
| @@ -1643,7 +1643,7 @@ void CExt2MgrDlg::OnCopyAll() | |||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| void CExt2MgrDlg::OnTimer(UINT nIDEvent)  | void CExt2MgrDlg::OnTimer(UINT_PTR nIDEvent)  | ||||||
| { | { | ||||||
| 	// TODO: Add your message handler code here and/or call default | 	// TODO: Add your message handler code here and/or call default | ||||||
|  |  | ||||||
| @@ -2115,7 +2115,7 @@ void CExt2MgrDlg::OnPartType() | |||||||
|         if (PartType.m_cPartType) { |         if (PartType.m_cPartType) { | ||||||
|  |  | ||||||
|             for (int i=0; i < m_DiskView.GetItemCount(); i++) { |             for (int i=0; i < m_DiskView.GetItemCount(); i++) { | ||||||
|                 if ((ULONG)part == m_DiskView.GetItemData(i)) { |                 if ((ULONG_PTR)part == m_DiskView.GetItemData(i)) { | ||||||
|                     Ext2RefreshDVPT(&m_DiskView, part, i); |                     Ext2RefreshDVPT(&m_DiskView, part, i); | ||||||
|                     break; |                     break; | ||||||
|                 } |                 } | ||||||
|   | |||||||
| @@ -154,7 +154,7 @@ protected: | |||||||
| 	virtual BOOL OnInitDialog(); | 	virtual BOOL OnInitDialog(); | ||||||
|     virtual void OnWindowPosChanging(WINDOWPOS* lpwndpos); |     virtual void OnWindowPosChanging(WINDOWPOS* lpwndpos); | ||||||
| 	afx_msg void OnSysCommand(UINT nID, LPARAM lParam); | 	afx_msg void OnSysCommand(UINT nID, LPARAM lParam); | ||||||
|     afx_msg BOOL OnDeviceChange(UINT nEventType, DWORD dwData); |     afx_msg BOOL OnDeviceChange(UINT nEventType, DWORD_PTR dwData); | ||||||
| 	afx_msg void OnDestroy(); | 	afx_msg void OnDestroy(); | ||||||
| 	afx_msg void OnPaint(); | 	afx_msg void OnPaint(); | ||||||
| 	afx_msg HCURSOR OnQueryDragIcon(); | 	afx_msg HCURSOR OnQueryDragIcon(); | ||||||
| @@ -185,7 +185,7 @@ protected: | |||||||
| 	afx_msg void OnRemoveService(); | 	afx_msg void OnRemoveService(); | ||||||
|     afx_msg void OnEnableAutorun();  |     afx_msg void OnEnableAutorun();  | ||||||
|     afx_msg void OnDisableAutorun(); |     afx_msg void OnDisableAutorun(); | ||||||
| 	afx_msg void OnTimer(UINT nIDEvent); | 	afx_msg void OnTimer(UINT_PTR nIDEvent); | ||||||
| 	afx_msg void OnDrvLetter(); | 	afx_msg void OnDrvLetter(); | ||||||
| 	afx_msg void OnDrvQuickMount(); | 	afx_msg void OnDrvQuickMount(); | ||||||
| 	afx_msg void OnShowMain(); | 	afx_msg void OnShowMain(); | ||||||
|   | |||||||
| @@ -206,7 +206,7 @@ BOOL Ext2DefineDosDevicePipe(DWORD flags,  CHAR *dos,  CHAR *symlink) | |||||||
|         q->drive = (UCHAR)toupper(dos[0]); |         q->drive = (UCHAR)toupper(dos[0]); | ||||||
|         q->flags = flags; |         q->flags = flags; | ||||||
|         strcpy(&q->name[0], symlink); |         strcpy(&q->name[0], symlink); | ||||||
|         p->len += strlen(symlink) + 1; |         p->len += (int)strlen(symlink) + 1; | ||||||
|  |  | ||||||
|         rc = Ext2PipeControl(&p, &len); |         rc = Ext2PipeControl(&p, &len); | ||||||
|         if (!rc) { |         if (!rc) { | ||||||
| @@ -235,7 +235,7 @@ BOOL Ext2DefineDosDevicePipe(DWORD flags,  CHAR *dos,  CHAR *symlink) | |||||||
|         q->drive = (UCHAR)toupper(dos[0]); |         q->drive = (UCHAR)toupper(dos[0]); | ||||||
|         q->flags = flags; |         q->flags = flags; | ||||||
|         strcpy(&q->name[0], symlink); |         strcpy(&q->name[0], symlink); | ||||||
|         p->len += strlen(symlink) + 1; |         p->len += (int)strlen(symlink) + 1; | ||||||
|  |  | ||||||
|         rc = Ext2PipeControl(&p, &len); |         rc = Ext2PipeControl(&p, &len); | ||||||
|         if ( !rc) { |         if ( !rc) { | ||||||
| @@ -460,7 +460,7 @@ errorout: | |||||||
|  |  | ||||||
| TCHAR *Ext2StrLastA(TCHAR *t, TCHAR *s) | TCHAR *Ext2StrLastA(TCHAR *t, TCHAR *s) | ||||||
| { | { | ||||||
|     int lt = strlen(t), ls = strlen(s), i; |     int lt = (int)strlen(t), ls = (int)strlen(s), i; | ||||||
|  |  | ||||||
|     for (i = lt - ls; i >= 0; i--) { |     for (i = lt - ls; i >= 0; i--) { | ||||||
|         if (0 == _strnicmp(&t[i], s, ls)) |         if (0 == _strnicmp(&t[i], s, ls)) | ||||||
| @@ -506,7 +506,7 @@ errorout: | |||||||
|  |  | ||||||
| WCHAR *Ext2StrLastW(WCHAR *t, WCHAR *s) | WCHAR *Ext2StrLastW(WCHAR *t, WCHAR *s) | ||||||
| { | { | ||||||
|     int lt = wcslen(t), ls = wcslen(s), i; |     int lt = (int)wcslen(t), ls = (int)wcslen(s), i; | ||||||
|  |  | ||||||
|     for (i = lt - ls; i >= 0; i--) { |     for (i = lt - ls; i >= 0; i--) { | ||||||
|         if (0 == _wcsnicmp(&t[i], s, ls)) |         if (0 == _wcsnicmp(&t[i], s, ls)) | ||||||
|   | |||||||
| @@ -65,7 +65,7 @@ bool CMyHyperLink::GoToLinkUrl(CString csLink) | |||||||
|  |  | ||||||
| 	HINSTANCE hInstance = (HINSTANCE)ShellExecute(NULL, _T("open"), csLink.operator LPCTSTR(), NULL, NULL, 2); | 	HINSTANCE hInstance = (HINSTANCE)ShellExecute(NULL, _T("open"), csLink.operator LPCTSTR(), NULL, NULL, 2); | ||||||
|  |  | ||||||
| 	if ((UINT)hInstance < HINSTANCE_ERROR){ | 	if ((UINT_PTR)hInstance < HINSTANCE_ERROR){ | ||||||
| 		return false; | 		return false; | ||||||
| 	}else | 	}else | ||||||
| 		return true; | 		return true; | ||||||
|   | |||||||
| @@ -219,7 +219,7 @@ errorout: | |||||||
|     return; |     return; | ||||||
| } | } | ||||||
|  |  | ||||||
| void CPerfStatDlg::OnTimer(UINT nIDEvent)  | void CPerfStatDlg::OnTimer(UINT_PTR nIDEvent)  | ||||||
| { | { | ||||||
|     RefreshPerfStat(); |     RefreshPerfStat(); | ||||||
| 	 | 	 | ||||||
|   | |||||||
| @@ -41,7 +41,7 @@ protected: | |||||||
| 	// Generated message map functions | 	// Generated message map functions | ||||||
| 	//{{AFX_MSG(CPerfStatDlg) | 	//{{AFX_MSG(CPerfStatDlg) | ||||||
| 	virtual BOOL OnInitDialog(); | 	virtual BOOL OnInitDialog(); | ||||||
| 	afx_msg void OnTimer(UINT nIDEvent); | 	afx_msg void OnTimer(UINT_PTR nIDEvent); | ||||||
| 	afx_msg void OnDestroy(); | 	afx_msg void OnDestroy(); | ||||||
| 	afx_msg void OnChangePerfstatInterval(); | 	afx_msg void OnChangePerfstatInterval(); | ||||||
| 	virtual void OnOK(); | 	virtual void OnOK(); | ||||||
|   | |||||||
| @@ -214,7 +214,7 @@ void CTreeList::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | |||||||
|             rcText.bottom += 1; |             rcText.bottom += 1; | ||||||
|             rcText.top = rcText.bottom - 6 + lf.lfHeight; |             rcText.top = rcText.bottom - 6 + lf.lfHeight; | ||||||
|  |  | ||||||
|             ::DrawText(lpDrawItemStruct->hDC, lpBuffer, strlen(lpBuffer),  |             ::DrawText(lpDrawItemStruct->hDC, lpBuffer, (int)strlen(lpBuffer),  | ||||||
|                               &rcText, DT_LEFT) ; |                               &rcText, DT_LEFT) ; | ||||||
|  |  | ||||||
|             CRect rect = lpDrawItemStruct->rcItem; |             CRect rect = lpDrawItemStruct->rcItem; | ||||||
| @@ -263,7 +263,7 @@ void CTreeList::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) | |||||||
|             lvi.cchTextMax = sizeof(lpBuffer); |             lvi.cchTextMax = sizeof(lpBuffer); | ||||||
|             GetItem(&lvi); |             GetItem(&lvi); | ||||||
|     |     | ||||||
|             ::DrawText(lpDrawItemStruct->hDC, lpBuffer, strlen(lpBuffer),  |             ::DrawText(lpDrawItemStruct->hDC, lpBuffer, (int)strlen(lpBuffer),  | ||||||
|                               &rcText, uFormat) ; |                               &rcText, uFormat) ; | ||||||
|  |  | ||||||
|             if (nCol == 0) { |             if (nCol == 0) { | ||||||
|   | |||||||
| @@ -2803,7 +2803,7 @@ Ext2SetGlobalProperty ( | |||||||
|                             0, |                             0, | ||||||
|                             REG_SZ, |                             REG_SZ, | ||||||
|                             (BYTE *)Codepage, |                             (BYTE *)Codepage, | ||||||
|                             strlen(Codepage)); |                             (int)strlen(Codepage)); | ||||||
|  |  | ||||||
|     /* set hiding filter patterns */ |     /* set hiding filter patterns */ | ||||||
|     status = RegSetValueEx( hKey, |     status = RegSetValueEx( hKey, | ||||||
| @@ -2811,14 +2811,14 @@ Ext2SetGlobalProperty ( | |||||||
|                             0, |                             0, | ||||||
|                             REG_SZ, |                             REG_SZ, | ||||||
|                             (BYTE *)sPrefix, |                             (BYTE *)sPrefix, | ||||||
|                             strlen(sPrefix)); |                             (int)strlen(sPrefix)); | ||||||
|  |  | ||||||
|     status = RegSetValueEx( hKey, |     status = RegSetValueEx( hKey, | ||||||
|                             "HidingSuffix", |                             "HidingSuffix", | ||||||
|                             0, |                             0, | ||||||
|                             REG_SZ, |                             REG_SZ, | ||||||
|                             (BYTE *)sSuffix, |                             (BYTE *)sSuffix, | ||||||
|                             strlen(sSuffix)); |                             (int)strlen(sSuffix)); | ||||||
|  |  | ||||||
|     RegCloseKey(hKey); |     RegCloseKey(hKey); | ||||||
|  |  | ||||||
| @@ -4382,7 +4382,7 @@ Ext2SetRegistryMountPoint ( | |||||||
|                     hKey, drvPath, |                     hKey, drvPath, | ||||||
|                     0, REG_SZ, |                     0, REG_SZ, | ||||||
|                     (BYTE *)devName, |                     (BYTE *)devName, | ||||||
|                     strlen(devName) |                     (int)strlen(devName) | ||||||
|                     ); |                     ); | ||||||
|     } else { |     } else { | ||||||
|         /* delete key */ |         /* delete key */ | ||||||
| @@ -5056,7 +5056,7 @@ Ext2SetAppAutorunXP(BOOL bInstall) | |||||||
|         } |         } | ||||||
|     } else { |     } else { | ||||||
|         status = RegSetValueEx( key, EXT2_MANAGER_NAME, 0, REG_SZ,  |         status = RegSetValueEx( key, EXT2_MANAGER_NAME, 0, REG_SZ,  | ||||||
|                                    (BYTE *)appPath, strlen(appPath)); |                                    (BYTE *)appPath, (int)strlen(appPath)); | ||||||
|         if (status != ERROR_SUCCESS) { |         if (status != ERROR_SUCCESS) { | ||||||
|             goto errorout; |             goto errorout; | ||||||
|         } |         } | ||||||
| @@ -5127,7 +5127,7 @@ BOOL Ext2SetAutoRunUserList(CHAR *userList) | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     status = RegSetValueEx( key, "AutorunUsers", 0, REG_SZ,  |     status = RegSetValueEx( key, "AutorunUsers", 0, REG_SZ,  | ||||||
|                             (BYTE *)userList, strlen(userList)); |                             (BYTE *)userList, (int)strlen(userList)); | ||||||
|     if (status != ERROR_SUCCESS) { |     if (status != ERROR_SUCCESS) { | ||||||
|         goto errorout; |         goto errorout; | ||||||
|     } |     } | ||||||
| @@ -5142,7 +5142,7 @@ errorout: | |||||||
| TCHAR * | TCHAR * | ||||||
| Ext2StrStr(TCHAR *s, TCHAR *t) | Ext2StrStr(TCHAR *s, TCHAR *t) | ||||||
| { | { | ||||||
|     int ls = _tcslen(s), lt = _tcslen(t), i; |     int ls = (int)_tcslen(s), lt = (int)_tcslen(t), i; | ||||||
|     for (i = 0; i + lt <= ls; i++) { |     for (i = 0; i + lt <= ls; i++) { | ||||||
|         if (0 == _tcsnicmp(&s[i], t, lt)) |         if (0 == _tcsnicmp(&s[i], t, lt)) | ||||||
|             return &s[i]; |             return &s[i]; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user