What’s New: http://blogs.msdn.com/b/vcblog/archive/2012/02/29/10272778.aspx
Downloads: http://www.microsoft.com/visualstudio/11/en-us/downloads
The command to enable large address aware is as follows…
EditBin /LARGEADDRESSAWARE NotePad.exe
How to check if the above command worked or not? Run the above executable (in our case NotePad.exe) with DumpBin.exe.
C:\> DumpBin /Headers NotePad.exe
FILE HEADER VALUES
14C machine (x86)
4 number of sections
4BA1DC16 time date stamp Thu Mar 18 02:53:58 2010
0 file pointer to symbol table
0 number of symbols
E0 size of optional header
122 characteristics
Executable
Application can handle large (>2GB) addresses
32 bit word machine
See highlighted line.
What do we mean by intrinsic?
Most functions are contained in libraries, but some functions are built in (that is, intrinsic) to the compiler. These are referred to as intrinsic functions or intrinsics.
Taken from MSDN…
The __noop intrinsic specifies that a function should be ignored and the argument list be parsed but no code be generated for the arguments. It is intended for use in global debug functions that take a variable number of arguments.
The compiler converts the __noop intrinsic to 0 at compile time. The following code shows how you could use __noop.
// compiler_intrinsics__noop.cpp
// compile with or without /DDEBUG
#include <stdio.h>
#if DEBUG
#define PRINT printf_s
#else
#define PRINT __noop
#endif
int main()
{
PRINT("\nhello\n");
}
So if you have custom macros which should expand to nought in release version the proper way to do this would be via __noop. Remember this is Microsoft(R) specific.
There’s a new C++ Standard and a new version of Visual C++, and it’s time to reveal those features. Read more here…
http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx
Note: Quote from a mail that I received.
Microsoft Visual C++: Design patterns for Decomposition, and Coordination on Multicore Architectures is now available!
Where Can I Get The Book?
The content is available right now on MSDN Library: Parallel Programming with Microsoft Visual C++. The layout isn’t quite as nice as the printed book but all the content is there. The publication coincides with the release of Visual Studio SP1 giving us some significant new content to show to developers and help them be successful with the latest parallel programming features in Visual Studio.
The printed book is available for pre-order from O’Reilly:
Parallel Programming with Microsoft® Visual C++
The eBook will also be available for download from O’Reilly and Safari Books Online shortly. Expect to see it on Amazon real soon! When I have hardcopies I’ll be making them available as I did with the .NET book
What’s In The Book?
The book describes six key patterns for data and task parallelism and how to implement them using the Parallel Patterns Library and Asynchronous Agents Library, which shipped with Visual Studio 2010.
The book also includes additional material. Appendices on how the Task Scheduler and Resource Manager work and how to use the Visual Studio profiler and debugger to understand your application’s performance. It also include an appendix on Microsoft’s technology roadmap for technical computing, that sets the book in a larger context.
How About Code Samples?
Accompanying the book are code samples for each chapter. This includes small code samples showing how to use each feature of the Task Parallel Library and a larger example for each chapter setting the pattern in a larger context. You can download them from our Parallel Patterns CodePlex site. You can also download answers to the questions at the end of each chapter from CodePlex.
Acknowledgements
Once again I’d like to thank my co-author, Colin Campbell and the team of editors and production specialists who did all the real work. I’d also like to thank the countless people who provided feedback, helped with samples and reviewed material. They are all acknowledged in the book.
WinDbg rocks.
Setting breakpoints is very easy in WinDbg. The command to set a breakpoint is ‘bp’. So if you want to break whenever a dll is loaded into a process then type in following command…
bp kernel32!LoadLibraryW
So to trigger this breakpoint attach ‘notepad.exe’ to the debugger and then type in this command. Now let the app run (press F5). Goto File->Open (this will trigger a definite LoadLibrary :)). Now have a look in WinDbg which will have following output…
Breakpoint 0 hit kernel32!LoadLibraryW: 00000000`76e50420 4533c0 xor r8d,r8d
To view call stack, type in ‘kpn’. I’ll blog more on breakpoints as and when I get time. Happy debugging.
This is one cool feature of Visual Studio which I very much like, the shortcut for this feature makes life even more easy.
So what does this feature do?
Imagine we’re are stuck in a heavy duty for loop and you want to immediately break after the for loop but don’t want to traverse through the entire for loop iteration, move your cursor to the line below the for loop (of course it must be a c++ statement) and press Ctrl + F10. The result of this action is that the debugger will ‘execute’ (no it won’t skip) the entire for loop and break at the line that you chose.
I used to use this feature frequently so I guess this will help save sometime for you too.
If you are creating a dialog with style WS_CHILD then make sure you also have DS_CONTROL and DS_CONTROLPARENT enabled for the dialog.
The reason being that the dialog at a time is a control (embedded inside another window) and a control parent (housing other controls). If these styles are not specified calls to GetWindowRect and then a subsequent ScreenToClient will return top co-ordinates in negative leading to some confusion.


