Export (0) Print
Expand All

Libraries

Visual Studio .NET 2003

The following libraries included in Visual C++ .NET are either new or have changed.

Active Template Library (ATL)

  • The default settings for ATL projects have changed. See Default ATL Project Configurations for details.
  • More reference topics for ATL methods contain code examples.
  • Support for collections and enumerators: ICollectionOnSTLImpl, IEnumOnSTLImpl, CComEnumImpl, CComEnumOnSTL, CComEnum
  • A new class, CImage, that provides enhanced bitmap support, including the ability to load and save images in JPEG, GIF, BMP, and Portable Network Graphics (PNG) formats.
  • New classes for managing arrays, lists and trees: CAtlArray Class, CAtlList Class, CAtlMap Class, CRBMap Class, and CRBMultiMap Class.
  • New string conversion macros and classes: ATL and MFC String Conversion Macros.
  • Utility classes: CAdapt
  • Hosting ActiveX controls: IAxWinAmbientDispatch, IAxWinHostWindow, CAxWindow2
  • Enhancements to CComBSTR and CComVariant
  • New macros: OBJECT_ENTRY_AUTO and OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO
  • Simplified object creation: CComCoClass::CreateInstance
  • Improved debugging support: _ATL_DEBUG_INTERFACES
  • Registry support for REG_MULTI_SZ values: CRegKey, Creating Registrar Scripts
  • New security classes: CAcl, CDacl, CSacl, CSecurityAttributes, CSecurityDesc, CSid, CTokenGroups and CTokenPrivileges.
  • New array management classes: CSimpleArray, CSimpleMap, CComSafeArray, CComSafeArrayBound.
  • A Currency object class: CComCurrency.
  • The following ATL macros should be considered obsolete: atlTraceFlags, ATLTrace, BEGIN_OBJECT_MAP, OBJECT_ENTRY, END_OBJECT_MAP.
  • Several ATL methods have been replaced: for details see the section "Deprecated ATL Functions" in Obsolete ATL Topics.
  • The functionality of CComModule has been distributed into several new classes; see ATL Module Classes for details.

ATL Server

ATL Server is a set of native C++ classes that allows developers to create Web applications, XML Web services, and other server applications. Many classes can also be used in client applications or components.

ATL Server is new to Visual C++. For more information, see ATL Server and ATL Server Reference.

C Run-Time Library

Microsoft Foundation Class (MFC) Library

  • Reference topics for MFC contain hundreds of new code examples.
  • Static Casting and MFC Message Maps   Beginning with Visual C++ .NET, MFC provides stricter type checking for return and parameter types of message handler functions. This new behavior notifies the developer of potential problems by flagging potentially unsafe message handlers with an error message. MFC now uses static casts for ON_MESSAGE, ON_REGISTERED_MESSAGE, ON_THREAD_MESSAGE, and ON_REGISTERED_THREAD_MESSAGE.

    For example, in the past a developer could use a member function that returned void instead of LRESULT for ON_MESSAGE or ON_REGISTERED_MESSAGE and compile without any errors. With Visual C++ .NET, the potential miscast is caught and flagged as an error. The developer can fix the potential problem by replacing the return type (with LRESULT) and recompiling.

  • DHTML editing component: CHtmlEditCtrl, CHtmlEditView, CHtmlEditDoc
  • DHTML dialog boxes: CDHtmlDialog, CMultiPageDHtmlDialog
  • ISAPI support for parsing argument lists: CHttpArg, CHttpArgList
  • Support for windowless controls: COleControlSite, COleControlContainer, and COccManager
  • Enhanced support for using HTML Help in an MFC application: Displaying the Help Viewer.
  • Windows 2000 print property sheet: CPrintDialogEx.
  • DAO support: The Visual C++ MFC Application Wizard and MFC DLL Application Wizard no longer support DAO database projects. You can still add DAO-derived classes using the Add Class Wizard. Microsoft recommends using OLE DB or ODBC for new native C++ projects. You should use DAO only in maintaining existing applications.
  • TRACE0, TRACE1, TRACE2, and TRACE3 are now considered obsolete; use ATLTRACE2. TRACE now has the same functionality as ATLTRACE2.
  • When selecting a dialog box font, use MS Shell Dlg, not MS Sans Serif or Helv fonts. Previous versions of MFC would automatically replace MS Sans Serif or Helv with DEFAULT_GUI_FONT or the system font, but MFC no longer does that. See General MBCS Programming Advice.
  • Enhanced support for localized resources in satellite DLLs: Localized Resources in MFC Applications: Satellite DLLs.

OLE DB Templates

The following OLE DB Templates are provided in Visual C++:

New Consumer Classes

  • CDataConnection
  • CDynamicAccessor
  • CDynamicParameterAccessor
  • CDynamicStringAccessor
  • CDynamicStringAccessorA
  • CDynamicStringAccessorW
  • CStreamRowset
  • CXMLAccessor

New Consumer Macros

  • COLUMN_NAME* macros for binding to a specific column in the database by name.
  • BLOB* macros for binding binary large objects (BLOB).

New Provider Classes

  • IDBSchemaRowsetImpl
  • IErrorRecordsImpl
  • IRowsetChangeImpl
  • IRowsetCreatorImpl
  • IRowsetNotifyCP
  • IRowsetNotifyImpl
  • IRowsetLocateImpl
  • IRowsetUpdateImpl

New 64-bit Data Types

Methods in several OLE DB Templates classes have been changed to use the new 64-bit data types instead of the old 32-bit ones. The documentation has been updated to reflect these changes. In case of discrepancy between the documentation and the header files (atldb.h, atldbcli.h, and atldbsch.h), the header files contain the most current parameter types.

For more information, see What's New in the MDAC SDK.

Breaking Changes from Visual C++ 6.0 to Visual C++ .NET

Breaking changes in OLE DB Templates from Visual C++ 6.0 to Visual C++ .NET are listed below. You can find more information on changes in the OLE DB Templates as described in the Knowledge Base article "INFO: Porting Issues with Visual Studio .NET OLE DB Provider Template Classes" (Q321743). You can find Knowledge Base articles on the MSDN Library CD-ROM or at http://support.microsoft.com/support.

OLE DB Consumer classes and templates:

As a general note, the accessor class must implement additional members. This is only necessary if you implement your own accessor class manually. If your accessor class derives from CAccessor, you need not do this.

Visual C++ 6.0 Visual C++ .NET
CRowset is a class. CRowset is a class template and takes one parameter, TAccessor, an accessor class.
CBulkRowset is a class. CBulkRowset is a class template.
The base class for CArrayRowset was a template parameter (default value was CRowset). CArrayRowset always derives from CBulkRowset.
CDynamicAccessor::GetColumnInfo took three parameters. CDynamicAccessor::GetColumnInfo has a new form that takes an additional parameter, ppStringsBuffer. Using this parameter eliminates a memory leak. The old method is deprecated.
Rowset, second parameter of the CAccessorRowset template, is a rowset class. TRowset, second parameter of the CAccessorRowset template, is a rowset class template.
Rowset, second parameter of the CTable template, is a rowset class. TRowset, second parameter of the CTable template, is a rowset class template.
Rowset, second parameter of the CCommand template, is a rowset class. TRowset, second parameter of the CCommand template, is a rowset class template.
DEFINE_COMMAND macro DEFINE_COMMAND macro is deprecated. Use DEFINE_COMMAND_EX instead.

OLE DB Provider classes and templates:

The internal implementation of many interfaces and methods has changed since Visual C++ 6.0. This may cause compatibility issues depending on whether your application overrides these methods.

Visual C++ 6.0 Visual C++ .NET
The rowset/accessor implementation used CSimpleMap/CSimpleArray classes. User-provided collection classes had to be CSimpleMap/CSimpleArray compatible. The rowset/accessor implementation uses CAtlMap/CAtlArray classes. User-provided collection classes have to be CAtlMap/CAtlArray compatible. In addition, code that calls methods of these collection classes should be reviewed as there are significant differences between the CAtl* and CSimple* classes (parameters, return values, and so on) that can result in run-time errors.
ICommandImpl derived from ICommand. ICommandImpl is a template that derives from the template's CommandBase argument (the default is ICommand).
ICommandTextImpl derived from ICommandImpl<ICommandImpl<T>. ICommandTextImpl derives from ICommandImpl<ICommandImpl<T, ICommandText>. Note that here ICommandImpl derives from ICommandText (not the default ICommand).

Shared Classes

A number of new and revised classes can now be used in any C++ program. For details, see the Shared Classes.

Standard C++ Library

The Standard C++ Library has been updated:

Old iostream Library

For Visual C++, the use of the old iostream library is deprecated; you will get a warning each time you use an iostream function. It is possible that the old iostream library will be removed in a subsequent release.

See Also

Major Changes from Visual C++ 6.0 to Visual C++ .NET

Show:
© 2014 Microsoft