Escolar Documentos
Profissional Documentos
Cultura Documentos
VC++ 9.0
Fabio Galuppo
Software Engineer (Im a programmer!) Visual C++ MVP C/C++ Brasil Community Member
applications now comply with the Windows Vista style guidelines The ATL Project wizard now has an option to register components for all users Writing to the registry can be redirected The Class Designer now has limited support for native C++ code
http://msdn2.microsoft.com/en-us/library/bb384632.aspx
http://msdn2.microsoft.com/en-us/magazine/cc163402.aspx
http://msdn2.microsoft.com/en-us/library/bb384632.aspx
The compiler supports managed incremental builds. The compiler supports Intel Core 2 microarchitecture Intrinsics support newer AMD and Intel chipsets. The __cpuid function is updated. The /MP compiler option reduces total build time. The /Wp64 compiler option and __w64 keyword are deprecated. /Qfast_transcendentals /Qimprecise_fwaits
Linker
User Account Control information is now embedded into manifest files for executables by the Visual C++ linkerMFC Library The linker now has the /DYNAMICBASE option to enable the Address Space Layout Randomization feature of Windows Vista
http://msdn2.microsoft.com/en-us/library/bb384632.aspx
(UI) elements such as the Office Fluent UI, docking windows and MDI tabbed windows similar to those used in some releases of Visual Studio, enhanced toolbars, a rich new set of controls, support for controlling the overall visual style, support for desktop alerts, and much more. Enables you to build MFC applications that have the visual style of a Microsoft Office, Visual Studio, or Internet Explorer application. The MFC Feature Pack library provides customizable toolbars, menus, keyboards, menu bars, and docking panes.
http://blogs.msdn.com/vcblog/archive/2007/11/09/quick-tour-of-new-mfc-functionality.aspx
http://blogs.msdn.com/vcblog/archive/2007/11/09/quick-tour-of-new-mfc-functionality.aspx
http://blogs.msdn.com/vcblog/archive/2007/11/09/quick-tour-of-new-mfc-functionality.aspx
http://blogs.msdn.com/vcblog/archive/2007/11/09/quick-tour-of-new-mfc-functionality.aspx
http://blogs.msdn.com/vcblog/archive/2007/11/09/quick-tour-of-new-mfc-functionality.aspx
http://blogs.msdn.com/vcblog/archive/2007/11/09/quick-tour-of-new-mfc-functionality.aspx
ISO standard included in the draft document Technical Report 1. Microsoft's implementation includes support for fixed size arrays, function objects, hash tables, regular expressions, template metaprogramming, template types for aggregating related objects, and random number generation.
Portions of TR1 are scheduled for adoption in the
upcoming C++0x standard as the first major addition to the ISO 2003 standard C++ library.
http://blogs.msdn.com/vcblog/archive/2008/02/22/tr1-slide-decks.aspx
<array> <functional> <memory> <random> <regex> <tuple> <type_traits> <unordered_map> <unordered_set> <utility>
http://blogs.msdn.com/vcblog/archive/2008/02/25/channel-9-stephan-t-lavavej-digging-into-c-technical-report-1-tr1.aspx
STL/CLR
Bring STL idioms to CLR types
Same containers Same complexity Same iterators
And
Containers expose .NET collection interfaces IEnumerable, ICollection, IList, IDictionary Usable outside a single assembly
Marshaling
New library to simplify passing data between CComBSTR
native andSystem::String^code managed System::String^ wchar_t * ATL::CStringT<wchar_t> System::String^ Template-based pattern that applies to any kind System::String^ System::String^ bstr_t BSTR std::string of data System::String^ System::IntPtr HANDLE ATL::CStringT<char> Support lots of types out-of-the-box
System::String^ const char * System::String^ const wchar_t * System::String^
char *
Stateless Transition
I want to marshal between managed and native data types for conversions that do not require any lifetime management or complex resource allocation
#include <msclr/marshal.h> using namespace msclr::interop;
const char* sourcestring1 = teststring System::String^ deststring1; // Convert const char* to System::String^ using // TO to = marshal_as <TO> (from) deststring1 = marshal_as<System::String^>(sourcestring1);
Stateful Transition
I want to marshal between managed and native data types for conversions that require some kind of lifetime (memory, resource, etc)
#include <msclr/marshal.h> using namespace msclr::interop; System::String^ sourcestring1 = teststring const char* deststring1; // Convert System::String^ to const char* marshal_context ctx; deststring1 = ctx.marshal_as<const char*>(sourcestring1);
Elegant Interop
STL/CLR + Marshaling = Better Interop
#include <cliext\list> #include <cliext\adapter> // Take generic collection and transform into container. No copying void MyFunction(Generic::IList<int>^ list ) { cliext::collection_adapter<Generic::IList<int>> cont( list ); cliext::list<int> myList( cont.size() ); cliext::transform(cont.begin(), cont.end(),myList.begin(), cliext::bind2nd(cliext::plus<int>(),2)); }
Security
Lets review
/GS /SafeSEH DEP Compatibility (/NXCompat) Data Execution Prevention
ASLR
http://msdn2.microsoft.com/en-us/library/bb430720.aspx
Build in Parallel
In 2005
Build Multiple Project in Parallel Tools > Options > Project and Solutions > Build and
In 2008
Build Multiple Translation Units in Parallel /MP or /MPn (where n is no. of CPUs) Project Properties > C/C++ > Command Line >
Additional Options
Resources
Fabio Galuppo Blog
http://fabiogaluppo.spaces.live.com/