sorinmustaca.com – Sorin Mustaca – personal blog. Security software, agile development, scrum, programming and more

What's New in Visual C++ 2010

12.03.2010 (10:02 pm) – Filed under: News

What’s New in Visual C++ 2010
This topic introduces new and enhanced Visual C++ features in Visual Studio 2010.
Amazon: Bestsellers Electronics and Photo

Visual C++ Projects and the Build System
MSBuild
Visual C++ solutions and projects are now built by using MSBuild, which replaces VCBUILD.exe. MSBuild is the same flexible, extensible, XML-based build tool that is used by the other Visual Studio languages and project types. Consequently, Visual C++ project files now use an XML file format, and have the .vcxproj file name extension. Visual C++ project files from earlier versions of Visual Studio are automatically converted to the new file format. For more information, see MSBuild (Visual C++).

VC++ Directories
The VC++ Directories setting now resides in two places. Use project property pages to set per-project values for VC++ directories. Use the Property Manager and a property sheet to set global, per-configuration values for VC++ directories.

Amazon: Bestsellers Electronics and Photo

Project-to-Project Dependencies
In earlier releases, you could define dependencies between projects that were stored in the solution file. When these solutions are converted to the new project file format, dependencies are converted to project-to-project references. This change can affect applications since the concepts of solution dependencies and project-to-project references are different.

Macros and Environment Variables
The new _ITERATOR_DEBUG_LEVEL macro invokes debugging support for iterators. Use this macro instead of the older _SECURE_SCL and _HAS_ITERATOR_DEBUGGING macros.

Amazon: Bestsellers Electronics and Photo

Visual C++ Libraries
/analyze Warnings
Most /analyze (Enterprise Code Analysis) warnings have been removed from the CRT, MFC, and ATL libraries.

Restart Manager
The restart manager automatically saves documents and restarts your application if it unexpectedly closes or restarts. For example, you can use the restart manager to start your application after it is closed by an automatic update. For more information about how to configure your application to use the restart manager, see How to: Add Restart Manager Support.

Amazon: Bestsellers Electronics and Photo

MFC Library
The CTaskDialog class can be used instead of the standard AfxMessageBox message box. The CTaskDialog class displays and gathers more information than the standard message box does.

New ATL macros
New macros were added to ATL to expand the functionality of PROP_ENTRY_TYPE and PROP_ENTRY_TYPE_EX. PROP_ENTRY_INTERFACE and PROP_ENTRY_INTERFACE_EX enable you to add a list of valid CLSID’s. PROP_ENTRY_INTERFACE_CALLBACK and PROP_ENTRY_INTERFACE_CALLBACK_EX enable you to specify a callback function to determine if a CLSID is valid.

New Libraries
The SafeInt Library performs safe arithmetic operations that account for integer overflow. This library also compares different kinds of integers.

IDE
Improved IntelliSense Errors
In Visual Studio 2010, the integrated development environment (IDE) better detects errors that could cause a loss of IntelliSense and displays red wavy underlines under them. In addition, the IDE reports IntelliSense errors to the Error List Window. To display the code that is causing the problem, double-click the error in the Error List Window.

#include Auto-Complete Feature
The IDE supports auto-completion for the #include keyword. When you type #include, the IDE creates a pull-down list of valid header files. If you continue by typing a file name, the IDE filters the list based on your entry. At any point, you can select on the list the file you want to include. This lets you quickly include files without knowing the exact file name.

Amazon: Bestsellers Electronics and Photo

Visual C++ Compiler and Linker
auto Keyword
The auto keyword has a new purpose. Use the default meaning of the auto keyword to declare a variable whose type is deduced from the initialization expression in the declaration of the variable. The /Zc:auto compiler option invokes either the new or the previous meaning of the auto keyword.

decltype Operator
The decltype operator returns the type of a specified expression. Use the decltype operator in combination with the auto keyword to declare a type that is either complex or known only to the compiler. For example, use the combination to declare a template function whose return type depends on the types of its template arguments. Or, declare a template function that calls another function, and then returns the return type of the called function.

Lambda Expressions
Lambda functions have a function body but no name. Lambda functions combine the best characteristics of function pointers and function objects.

Use a lambda function by itself, as a template function parameter instead of a function object, or together with the auto keyword to declare a variable whose type is a lambda.

Rvalue Reference
The rvalue reference declarator (&&) declares a reference to an rvalue. An rvalue reference lets you use move semantics and perfect forwarding to write more efficient constructors, functions, and templates.

Amazon: Bestsellers Electronics and Photo

static_assert Declaration
A static_assert declaration tests a software assertion at compile time, unlike other assertion mechanisms that test at run time. If the assertion fails, the compilation fails and a specified error message is issued.

nullptr and __nullptr Keywords
The Visual C++ compiler lets you use the nullptr keyword with native code or with managed code. The nullptr keyword indicates that an object handle, interior pointer, or native pointer type does not point to an object. The compiler interprets nullptr to be managed code when you use the /clr compiler option, and native code when you do not use the /clr option.

The Microsoft-specific __nullptr keyword has the same meaning as nullptr, but it applies to native code only. If you compile native C/C++ code by using the /clr compiler option, the compiler cannot determine whether the nullptr keyword is a native or a managed term. To make your intention clear to the compiler, use the nullptr keyword to specify the managed term, and __nullptr to specify the native term.

/Zc:trigraphs Compiler Option
By default, support for trigraphs is disabled. Use the /Zc:trigraphs compiler option to enable trigraphs support.

A trigraph consists of two consecutive question marks (??) followed by a unique third character. The compiler replaces a trigraph with the corresponding punctuation character. For example, the compiler replaces the ??= trigraph with the # (number sign) character. Use trigraphs in C source files that use a character set that does not contain certain punctuation characters.

Amazon: Bestsellers Electronics and Photo

New Profile-Guided Optimization Option
PogoSafeMode is a new profile-guided optimization option that lets you specify whether to use safe mode or fast mode when you optimize your application. Safe mode is thread-safe, but it is slower than fast mode. Fast mode is the default behavior.

New Common Language Runtime (CLR) Option /clr:nostdlib
A new option is added for /clr (Common Language Runtime Compilation). If different versions of the same libraries are included, a compile error is issued. The new option lets you exclude the default CLR libraries so that your program can use a specified version.

New pragma directive detect_mistmatch
The pragma directive detect_mismatch enables you to place a tag in your files that is compared to other tags with the same name. If there are multiple values for the same name, the linker issues an error.

Tools
ATL Control Wizard
The ATL Control Wizard no longer automatically populates the ProgID field. If an ATL control does not have a ProgID, other tools may not work with it. One example of a tool that requires controls to have a ProgID is the Insert Active Control dialog box. For more information about the dialog box, see Insert ActiveX Control Dialog Box.

MFC Class Wizard
Visual Studio 2010 reintroduces the MFC Class Wizard. You can invoke the class wizard from anywhere in your solution. The wizard lets you add classes, messages, and variables without manually modifying the individual code files.

Microsoft Macro Assembler Reference
The addition of the YMMWORD data type supports the 256-bit multimedia operands that are included in the Intel Advanced Vector Extensions (AVX) instructions.

Amazon: Bestsellers Electronics and Photo

Philips NetTV and FritzBox 72xx

09.02.2010 (4:38 pm) – Filed under: News

I recently bought a new LCD TV from Philips : The 47″ PFL8404H/12 with NetTV.


Philips 47 PFL 8404 H 119,4 cm (47 Zoll) Full-HD Ambilight LCD-Fernseher mit integriertem DVB-T / DVB-C Tuner schwarz

Actually, I chose this TV because of two features it has:
1. The display : Full HD, 47″ , non reflective having the “Pixel Precise” feature
2. the Net TV: which means practically the you have an Internet connection in your TV set.

I have the FritzBox! 7240 from AVM which is a goot DSL modem and router.

The problem

However, after installating the TV and connecting it to the Internet I noticed that it looses, apparently randomly the connection to the router.
When connecting the old FritzBox 7170, everything worked as expected.

The reason

All FritzBoxes have a nice feature which tries to make the device eco friendly (aka “green”) by reducing the power consumption.
So, it has some automatic detection if a LAN port is used or not.


Philips 47 PFL 8404 H 119,4 cm (47 Zoll) Full-HD Ambilight LCD-Fernseher mit integriertem DVB-T / DVB-C Tuner schwarz

The Solution
After discussing with Heino, a colleague from Avira, he gave me an idea: what if the automatic detection of the LAN ports is not functioning correctly ?
And he was right.
Apparently, this automatic detection is not working correctly and it deactivates the port way to soon.
I deactivated the automatic detection by configuring that the ports must be always enabled and now everything is working perfectly !

And NetTV is a great feature !!!
YouTube on a 47″ TV is a nice thing. Or at least my 2 years old son thinks this when he is watching his Pluto cartoons.

Philips 47 PFL 8404 H 119,4 cm (47 Zoll) Full-HD Ambilight LCD-Fernseher mit integriertem DVB-T / DVB-C Tuner schwarz

No spam, please !

29.03.2008 (10:02 pm) – Filed under: General

Have a look at this picture taken today.
No spam, please

I live there and those are the post boxes of all the inhabitants of that building.
My box is in the middle (see the notes).

That sticker does the job :)
I never received a commercial … NEVER !!!

Can you believe this ?

My neighbor has the same sticker and he received spam. I didn’t …
I would call this pure luck, but, again, I never received those commercial papers.

Conceptronic CHD3LAN NAS Server

08.11.2006 (8:45 pm) – Filed under: General

I bought from eBay a brand new Networked Attached Storage server without HDD for 51 euro.
Cheap and nice toy.. but …
The company from which I bought it, advised me to upgrade the firmware via the web interface.
And I did, poor me :(

Needless to say that the box is dead now. During the upgrade, I got a timeout from the box and since then it just didn’t work.

I wrote to the support of Conceptronic and followed their advice, but without success.

Still trying.