From: Drakier D. <dra...@us...> - 2004-02-13 00:13:21
|
Log Message: ----------- added file versions to DLL files. Modified Files: -------------- /cvsroot/decaldev/source/DenAgent: ExportDlg.cpp Revision Data ------------- Index: ExportDlg.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DenAgent/ExportDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ExportDlg.cpp 12 Feb 2004 22:17:00 -0000 1.2 +++ ExportDlg.cpp 13 Feb 2004 00:08:07 -0000 1.3 @@ -421,8 +421,18 @@ if( hLib == NULL ) szOutput += "Not Installed\r\n"; else - szOutput += "Installed\r\n"; + { + char strDllFilePath[MAX_PATH] = {""}; + CString strDLLVersion; + GetModuleFileName(hLib, strDllFilePath, MAX_PATH); + if ( !CDenAgentApp::getVersionString ( strDllFilePath, strDLLVersion ) ) + strDLLVersion = _T( "(No Version)" ); + szOutput += "Installed ("; + szOutput += strDLLVersion; + szOutput += ")\r\n"; + } ::FreeLibrary(hLib); + AppendExportText(szOutput.c_str()); // msvcp 7.0 Runtime szOutput = "[msvcr70.dll]\t: "; @@ -430,100 +440,195 @@ if( hLib == NULL ) szOutput += "Not Installed\r\n"; else - szOutput += "Installed\r\n"; + { + char strDllFilePath[MAX_PATH] = {""}; + CString strDLLVersion; + GetModuleFileName(hLib, strDllFilePath, MAX_PATH); + if ( !CDenAgentApp::getVersionString ( strDllFilePath, strDLLVersion ) ) + strDLLVersion = _T( "(No Version)" ); + szOutput += "Installed ("; + szOutput += strDLLVersion; + szOutput += ")\r\n"; + } ::FreeLibrary(hLib); + AppendExportText(szOutput.c_str()); + // msvcr 7.0 Runtime - szOutput += "[msvcp70.dll]\t: "; + szOutput = "[msvcp70.dll]\t: "; hLib = ::LoadLibrary( "msvcp70.dll" ); if( hLib == NULL ) szOutput += "Not Installed\r\n"; else - szOutput += "Installed\r\n"; + { + char strDllFilePath[MAX_PATH] = {""}; + CString strDLLVersion; + GetModuleFileName(hLib, strDllFilePath, MAX_PATH); + if ( !CDenAgentApp::getVersionString ( strDllFilePath, strDLLVersion ) ) + strDLLVersion = _T( "(No Version)" ); + szOutput += "Installed ("; + szOutput += strDLLVersion; + szOutput += ")\r\n"; + } ::FreeLibrary(hLib); + AppendExportText(szOutput.c_str()); // msvcp 7.1 Runtime - szOutput += "[msvcr71.dll]\t: "; + szOutput = "[msvcr71.dll]\t: "; hLib = ::LoadLibrary( "msvcr71.dll" ); if( hLib == NULL ) szOutput += "Not Installed\r\n"; else - szOutput += "Installed\r\n"; + { + char strDllFilePath[MAX_PATH] = {""}; + CString strDLLVersion; + GetModuleFileName(hLib, strDllFilePath, MAX_PATH); + if ( !CDenAgentApp::getVersionString ( strDllFilePath, strDLLVersion ) ) + strDLLVersion = _T( "(No Version)" ); + szOutput += "Installed ("; + szOutput += strDLLVersion; + szOutput += ")\r\n"; + } ::FreeLibrary(hLib); + AppendExportText(szOutput.c_str()); + // msvcr 7.1 Runtime - szOutput += "[msvcp71.dll]\t: "; + szOutput = "[msvcp71.dll]\t: "; hLib = ::LoadLibrary( "msvcp71.dll" ); if( hLib == NULL ) szOutput += "Not Installed\r\n"; else - szOutput += "Installed\r\n"; + { + char strDllFilePath[MAX_PATH] = {""}; + CString strDLLVersion; + GetModuleFileName(hLib, strDllFilePath, MAX_PATH); + if ( !CDenAgentApp::getVersionString ( strDllFilePath, strDLLVersion ) ) + strDLLVersion = _T( "(No Version)" ); + szOutput += "Installed ("; + szOutput += strDLLVersion; + szOutput += ")\r\n"; + } ::FreeLibrary(hLib); + AppendExportText(szOutput.c_str()); // Haz - mfc+atl // mfc 7.0 runtime - szOutput += "[mfc70.dll]\t: "; + szOutput = "[mfc70.dll]\t: "; hLib = ::LoadLibrary( "mfc70.dll" ); if( hLib == NULL ) szOutput += "Not Installed\r\n"; else - szOutput += "Installed\r\n"; + { + char strDllFilePath[MAX_PATH] = {""}; + CString strDLLVersion; + GetModuleFileName(hLib, strDllFilePath, MAX_PATH); + if ( !CDenAgentApp::getVersionString ( strDllFilePath, strDLLVersion ) ) + strDLLVersion = _T( "(No Version)" ); + szOutput += "Installed ("; + szOutput += strDLLVersion; + szOutput += ")\r\n"; + } ::FreeLibrary(hLib); + AppendExportText(szOutput.c_str()); // mfc 7.1 runtime - szOutput += "[mfc71.dll]\t: "; + szOutput = "[mfc71.dll]\t: "; hLib = ::LoadLibrary( "mfc71.dll" ); if( hLib == NULL ) szOutput += "Not Installed\r\n"; else - szOutput += "Installed\r\n"; + { + char strDllFilePath[MAX_PATH] = {""}; + CString strDLLVersion; + GetModuleFileName(hLib, strDllFilePath, MAX_PATH); + if ( !CDenAgentApp::getVersionString ( strDllFilePath, strDLLVersion ) ) + strDLLVersion = _T( "(No Version)" ); + szOutput += "Installed ("; + szOutput += strDLLVersion; + szOutput += ")\r\n"; + } ::FreeLibrary(hLib); + AppendExportText(szOutput.c_str()); // atl 7.0 runtime - szOutput += "[atl70.dll]\t\t: "; + szOutput = "[atl70.dll]\t\t: "; hLib = ::LoadLibrary( "atl70.dll" ); if( hLib == NULL ) szOutput += "Not Installed\r\n"; else - szOutput += "Installed\r\n"; + { + char strDllFilePath[MAX_PATH] = {""}; + CString strDLLVersion; + GetModuleFileName(hLib, strDllFilePath, MAX_PATH); + if ( !CDenAgentApp::getVersionString ( strDllFilePath, strDLLVersion ) ) + strDLLVersion = _T( "(No Version)" ); + szOutput += "Installed ("; + szOutput += strDLLVersion; + szOutput += ")\r\n"; + } ::FreeLibrary(hLib); + AppendExportText(szOutput.c_str()); // atl 7.1 runtime - szOutput += "[atl71.dll]\t\t: "; + szOutput = "[atl71.dll]\t\t: "; hLib = ::LoadLibrary( "atl71.dll" ); if( hLib == NULL ) szOutput += "Not Installed\r\n"; else - szOutput += "Installed\r\n"; + { + char strDllFilePath[MAX_PATH] = {""}; + CString strDLLVersion; + GetModuleFileName(hLib, strDllFilePath, MAX_PATH); + if ( !CDenAgentApp::getVersionString ( strDllFilePath, strDLLVersion ) ) + strDLLVersion = _T( "(No Version)" ); + szOutput += "Installed ("; + szOutput += strDLLVersion; + szOutput += ")\r\n"; + } ::FreeLibrary(hLib); - - //::SendMessage( GetDlgItem( IDC_EDITEXPORT )->m_hWnd, WM_SETTEXT, 0, (LPARAM)szOutput.c_str() ); AppendExportText(szOutput.c_str()); - szOutput = ""; - + //::SendMessage( GetDlgItem( IDC_EDITEXPORT )->m_hWnd, WM_SETTEXT, 0, (LPARAM)szOutput.c_str() ); // Drakier: Get the MSXML Versions - szOutput += "\r\nMicrosoft XML Libraries\r\n"; - + szOutput = "\r\nMicrosoft XML Libraries\r\n"; + AppendExportText(szOutput.c_str()); // msxml3 - szOutput += "[msxml3.dll]\t: "; + szOutput = "[msxml3.dll]\t: "; hLib = ::LoadLibrary( "msxml3.dll" ); if( hLib == NULL ) szOutput += "Not Installed\r\n"; else - szOutput += "Installed\r\n"; + { + char strDllFilePath[MAX_PATH] = {""}; + CString strDLLVersion; + GetModuleFileName(hLib, strDllFilePath, MAX_PATH); + if ( !CDenAgentApp::getVersionString ( strDllFilePath, strDLLVersion ) ) + strDLLVersion = _T( "(No Version)" ); + szOutput += "Installed ("; + szOutput += strDLLVersion; + szOutput += ")\r\n"; + } ::FreeLibrary(hLib); + AppendExportText(szOutput.c_str()); // msxml4 - szOutput += "[msxml4.dll]\t: "; + szOutput = "[msxml4.dll]\t: "; hLib = ::LoadLibrary( "msxml4.dll" ); if( hLib == NULL ) szOutput += "Not Installed\r\n"; else - szOutput += "Installed\r\n"; + { + char strDllFilePath[MAX_PATH] = {""}; + CString strDLLVersion; + GetModuleFileName(hLib, strDllFilePath, MAX_PATH); + if ( !CDenAgentApp::getVersionString ( strDllFilePath, strDLLVersion ) ) + strDLLVersion = _T( "(No Version)" ); + szOutput += "Installed ("; + szOutput += strDLLVersion; + szOutput += ")\r\n"; + } ::FreeLibrary(hLib); - - //::SendMessage( GetDlgItem( IDC_EDITEXPORT )->m_hWnd, WM_SETTEXT, 0, (LPARAM)szOutput.c_str() ); AppendExportText(szOutput.c_str()); - szOutput = ""; + //::SendMessage( GetDlgItem( IDC_EDITEXPORT )->m_hWnd, WM_SETTEXT, 0, (LPARAM)szOutput.c_str() ); // Drakier: Get the Compat Mode Layers and display them. if (key.Open( HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers" ) == ERROR_SUCCESS) @@ -553,7 +658,7 @@ if ( strstr(szValueName, "client.exe") != NULL ) { if (!bTitle) - szOutput += "\r\nApplication Compatibility\r\n"; + szOutput = "\r\nApplication Compatibility\r\n"; bTitle = TRUE; szOutput += szValueName; szOutput += ": "; @@ -562,13 +667,12 @@ } } } + AppendExportText(szOutput.c_str()); } } key.Close(); // Display information - //::SendMessage( GetDlgItem( IDC_EDITEXPORT )->m_hWnd, WM_SETTEXT, 0, (LPARAM)szOutput.c_str() ); - AppendExportText(szOutput.c_str()); if (::MessageBox(NULL, "Would you like to export the data to the clipboard?", "Export Data...", MB_YESNO | MB_ICONQUESTION) == IDYES ) { if(OpenClipboard()) |