Welcome to MSDN Blogs Sign in | Join | Help

June 2004 - Posts

Whole Program Optimization pratical example...

I wrote those couple lines of code today as a short example of what Whole Program Optimization gives you with VC++ 7.x (although I used 8.0 Beta 1): Main.cpp: #include <iostream> extern void FunctionInOtherSource( int * ) ; void wmain() { for (
Posted by yvesdolc | 0 Comments

Microsoft Visual C++ Floating-Point Optimization

This has been revised: http://msdn.microsoft.com/visualc/using/understanding/perf/default.aspx?pull=/library/en-us/dv_vstechart/html/floapoint.asp
Posted by yvesdolc | 0 Comments

Herb Sutter's keynote address from SD West 2004

Herb makes the case for managed runtimes. He discusses C++, .NET, and Longhorn and the implications of these technologies for developers. http://go.microsoft.com/fwlink/?LinkId=28065
Posted by yvesdolc | 0 Comments

Secure CRT (hopefully fixed) code sample

Sorry for the confusion in the previous post . I guess it just shows again I’m no longer a full-time dev… As I had already changed the sample code, I left it the way it is now: #include <stdio.h> #include <stdlib.h> // _invalid_parameter_handler,
Posted by yvesdolc | 2 Comments

Webcast Series: The New C++

I just discovered this on http://msdn.microsoft.com/visualc/using/multimedia/NewC/default.aspx : “ This six part series covers the new Visual C++ 2005 language aims and will provide you with both the knowledge and practical skills to create great
Posted by yvesdolc | 0 Comments

Active Template Library (ATL) 7.0 and Attributes

It's an old WebCast but you might still be interested if you take into account that there are not that many books on the topic: http://support.microsoft.com/default.aspx?kbid=324780
Posted by yvesdolc | 0 Comments

Secure CRT code sample

When built in debug mode with the Visual Studio 2005 Community Technology Preview May 2004 , the following source code: #include <stdio.h> #include <stdlib.h> // _invalid_parameter_handler, _set_invalid_parameter_handler #include <tchar.h>
Posted by yvesdolc | 6 Comments

System::String -> std::string

Stan has an entry about converting a System::String to an std::string. Wouldn't it be better to minimize the time the string^ is pinned to minimize the effect this code has on the garbage collection process? bool To_CharStar( String^ source, char *&
Posted by yvesdolc | 0 Comments

How do I define a macro to get a string representing the __LINE__?

This comes from an internal Distribution List, I thought this might be useful: #define STRINGIFY(a) #a #define LINESTR STRINGIFY(__LINE__) printf("this is line %s\n", LINESTR); Outputs “this is line __LINE__” #define STRINGIFY(a) #a #define
Posted by yvesdolc | 0 Comments

My OffByOne.cpp (p. 136 of Writing Secure Code 2nd Ed.)

The source code, compiled with VS.NET 2003 in Release mode without /GS, optimization nor /RTC, ran on Windows XP SP2 ~RC2: #include <stdio.h> #include <string.h> #include <stdlib.h> void foo( const char * in ) { char buf[240] ; // Multiple
Posted by yvesdolc | 0 Comments

My StackOverrun.cpp (Writing Secure Code 2nd Ed.)

Here is the output (see p.129 Writing Secure Code 2nd Ed. ) Address of bar = 00401070 Entering foo(). My stack looks like: ^ 04030201 (buf[3], buf[2], buf[1], buf[0]) | Lower memory address | 08070605 (buf[7], buf[6], buf[5], buf[4]) | Stack | 00000009
Posted by yvesdolc | 0 Comments

VS.NET debugger and the memory windows

Hopefully, you've already realized that you can have more than one memory window. Four to be precise. What I just discovered, and like a lot, is the Reevaluate Automatically option. I'm playing with some code samples from the Writing Secure Code 2nd Ed.
Posted by yvesdolc | 0 Comments
 
Page view tracker