Why could COM interop layer be 40 times slower when client is compiled in VS 2010 vs VS 2005?

It was kind of a long shot. Glad I could help. Matching MTA vs STA (threading model) is really important when making lots of distinct calls into any COM object. An [STAThread] directive at the top of a method is one way to be sure of threading model for every call in that method. Looks … Read more

Visual Studio editor – extend selection to the next larger code block?

Visual Studio 2017 15.5.2 has this feature built-in after it was first hinted at in a Visual Studio 2017 Preview blog post (see section “Smart Code Editor”). Invoking it can be done by going to Edit > Advanced > Expand Selection or by binding the Edit.ExpandSelection command to ShiftAlt= (actually the default if you start … Read more

C++ redeclaration of loop count variable inconsistent behaviour?

According to the standard specification: 1 … names declared in the for-init-statement are in the same declarative-region as those declared in the condition 3 If the for-init-statement is a declaration, the scope of the name(s) declared extends to the end of the for-statement. [§6.5.3] and 4 Names declared in the for-init-statement, the for-range-declaration, and in … Read more

Difference between platform and platform target in VS

The first screen shot is showing the solution configuration (Debug) and solution platform (Mixed Platforms). What this is saying is that building a Debug version of the solution, the projects that make up the solution can target Mixed Platforms. If you explicitly chose x86, that means all your projects in your solution should use this … Read more

Make Visual Studio auto reload solution when project files change

Finally found a solution: http://lostechies.com/jimmybogard/2011/01/27/reloading-all-projects-with-vscommands/ Quoting from the site: Quite often I’ll find myself working in situations where multiple projects have changed, and Visual Studio asks to reload them, one at a time. This happens when I’m working a lot with source control, and doing things like switching branches, performing merges, or just integrating upstream … Read more