Click here to Skip to main content
15,887,776 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Get process handle access rights. Pin
«_Superman_»13-Sep-10 23:06
professional«_Superman_»13-Sep-10 23:06 
GeneralRe: Get process handle access rights. Pin
Green Fuze13-Sep-10 23:33
Green Fuze13-Sep-10 23:33 
GeneralRe: Get process handle access rights. Pin
Cool_Dev14-Sep-10 2:43
Cool_Dev14-Sep-10 2:43 
GeneralRe: Get process handle access rights. Pin
Green Fuze14-Sep-10 9:04
Green Fuze14-Sep-10 9:04 
Question::ReadProcessMemory fails with ERROR_PARTIAL_COPY Pin
Green Fuze10-Sep-10 10:50
Green Fuze10-Sep-10 10:50 
AnswerRe: ::ReadProcessMemory fails with ERROR_PARTIAL_COPY Pin
«_Superman_»12-Sep-10 19:25
professional«_Superman_»12-Sep-10 19:25 
GeneralRe: ::ReadProcessMemory fails with ERROR_PARTIAL_COPY Pin
Green Fuze12-Sep-10 20:26
Green Fuze12-Sep-10 20:26 
QuestionOLE runs slow on Windows 7 Pin
cdguenther8-Sep-10 7:26
cdguenther8-Sep-10 7:26 
I am testing a legacy app for use on Windows 7, both 32 and 64 bit. It presently runs on XP. For some unknown reason OLE database accesses take orders of magnitude time longer to run on Windows 7 than on XP. For this testing XP is running in a VM on the same Windows 7 64 bit machine used for Windows 7 testing, so the hardware is not the issue.
For example the following code takes 2276 ticks on Windows 7, 80 ticks on Windows XP.
// m_DBConnectSettings manages a OLE connection CString (m_sInitString)
// name = m_sInitString	
// value = {0x046dfed8 "Provider=SQLOLEDB;Persist Security Info=False;User ID=xx;Password=xxxxx;Data Source=MSSQL$XXXXXLOCAL;Initial Catalog=XxxxxxxxxxXXX"}
// type = ATL::CStringT<unsigned short,StrTraitMFC_DLL<unsigned short,ATL::ChTraitsCRT<unsigned short> > >

// I X’ed out company identifying information.  The actual SQL database files are on the local machine:
//    C:\Program Files(x86)\Common Files\Company Name\Databases\MSSQL$XXXXXLOCAL\Data folder.

startTime = GetTickCount();

// Try to connect to the database.
CDBConnection DB;	// inherits from CDataSource

if( DB.Open( m_DBConnectSettings ) )	 
{
    DB.Close();
    endTime = GetTickCount();
    logStr.Format(_T("CDBEngine::InitializeDatabase DB.Open elapsedTime: %d ticks"), (endTime - startTime));
    EventLog.LogEvent(0x04, logStr);
}

// And here is CDBConnection::Open
BOOL CDBConnection::Open( const CDBConnectSettings &Settings )
{
    USES_CONVERSION;
    return( SUCCEEDED( OpenFromInitializationString(
        T2COLE((LPCTSTR)Settings) ) ) );
}


I am using:
Development Studio 2003, version 7.1.6030
Microsoft .NET 1.1 Version 1.1.4322 SP1
MSDE 2000 (SQLServer Express derives from this).
The following system dlls:
DLL
Unless otherwise noted, the DLL versions are:
Windows 7 is Product version: 6.1.7600.16385
Windows XP is Product version: 5.1.2600.5755
ADVAPI32.DLL
COMCTL32.DLL WinXP = Product version: 6.00.2900.5512
COMDLG32.DLL
GDI32.DLL WinXP = Product version: 5.1.2600.5698
MAPI32.DLL WinXP = Product version: 5.1.2600.0
MFC42.DLL Win 7 = Product version: 6.06.400, Win XP = Product version: 6.02.400
MSVCRT.DLL Win 7 = Product version: 7.0.7600.16385, WinXP = Product version: 7.0.2600.5512
OLE32.DLL WinXP = Product version: 5.1.2600.5512
OLEAUT32.DLL Win 7 = Product version: 6.1.7600.16567, WinXP = Product version: 5.1.2600.5512
RPCRT4.DLL WinXP = Product version: 5.1.2600.5795
SHELL32.DLL WinXP = Product version: 6.00.2900.6018
SHLWAPI.DLL WinXP = Product version: 6.00.2900.5912
USER32.DLL WinXP = Product version: 5.1.2600.5512
WINMM.DLL

Thanks for any thoughts, suggestions, ideas, answers, etc.
Clarence
QuestionHow to develop the tool like Visual C++ "Resource View Editer" ? Pin
wangningyu7-Sep-10 23:54
wangningyu7-Sep-10 23:54 
AnswerRe: How to develop the tool like Visual C++ "Resource View Editer" ? Pin
Richard MacCutchan8-Sep-10 3:01
mveRichard MacCutchan8-Sep-10 3:01 
JokeRe: How to develop the tool like Visual C++ "Resource View Editer" ? Pin
Cool_Dev8-Sep-10 3:12
Cool_Dev8-Sep-10 3:12 
GeneralRe: How to develop the tool like Visual C++ "Resource View Editer" ? Pin
wangningyu8-Sep-10 5:00
wangningyu8-Sep-10 5:00 
GeneralRe: How to develop the tool like Visual C++ "Resource View Editer" ? Pin
Cool_Dev8-Sep-10 5:04
Cool_Dev8-Sep-10 5:04 
GeneralRe: How to develop the tool like Visual C++ "Resource View Editer" ? Pin
wangningyu8-Sep-10 5:12
wangningyu8-Sep-10 5:12 
QuestionI cannot install sp1 package for the visual studio 2005 [modified][solved] Pin
yu-jian7-Sep-10 19:16
yu-jian7-Sep-10 19:16 
AnswerRe: I cannot install sp1 package for the visual studio 2005 Pin
wangningyu8-Sep-10 1:39
wangningyu8-Sep-10 1:39 
GeneralRe: I cannot install sp1 package for the visual studio 2005 Pin
yu-jian15-Sep-10 15:09
yu-jian15-Sep-10 15:09 
AnswerRe: I cannot install sp1 package for the visual studio 2005 Pin
VeganFanatic11-Sep-10 4:29
VeganFanatic11-Sep-10 4:29 
QuestionMemory allocation problem in C++ (memory Leak) Pin
Nab Younus7-Sep-10 15:50
Nab Younus7-Sep-10 15:50 
AnswerRe: Memory allocation problem in C++ (memory Leak) Pin
Anand Todkar9-Sep-10 3:53
Anand Todkar9-Sep-10 3:53 
QuestionWhen run,the program cannot find MFC80UD.DLL in vs2005 [modified][solved] Pin
yu-jian6-Sep-10 18:21
yu-jian6-Sep-10 18:21 
AnswerRe: When run,the program cannot find MFC80UD.DLL in vs2005 Pin
Richard MacCutchan6-Sep-10 21:29
mveRichard MacCutchan6-Sep-10 21:29 
GeneralRe: When run,the program cannot find MFC80UD.DLL in vs2005 Pin
yu-jian7-Sep-10 3:34
yu-jian7-Sep-10 3:34 
GeneralRe: When run,the program cannot find MFC80UD.DLL in vs2005 Pin
Richard MacCutchan7-Sep-10 4:27
mveRichard MacCutchan7-Sep-10 4:27 
GeneralRe: When run,the program cannot find MFC80UD.DLL in vs2005 Pin
yu-jian8-Sep-10 0:28
yu-jian8-Sep-10 0:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.