You receive a link error when you build an application that contains a base class in Visual C++

When building an application that contains a base class with a pure virtual operator= function and a class derived from the base class with a defined operator= function, a following link error is generated for the base class's operator=: error LNK2001: unresolved external symbol This also occurs if the classes reside in a DLL and are declared with the __declspec( dllexport ) storage-class attribute. In Visual C++ .NET you will receive the following error message: LNK2019: unresolved external symbol CAUSE loadTOCNode(1, 'cause'); This behavior is ... Read more..

February 28th, 2010 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

FIX: You may experience performance issues in the IDE after you use Visual Studio 2008 to build a Visual Basic project

Consider the following scenario: • You use Microsoft Visual Studio 2008 to build a Microsoft Visual Basic project. • The Visual Basic project contains many XML comments in a single file. • The file is probably a designer-generated file for a dataset or for a Web reference. In this scenario, you may experience the following performance issues in the IDE: • The IDE takes a long time to build the solution and to rebuild the solution. • You experience a slow response time when you press F5 to start debugging. • You experience ... Read more..

February 2nd, 2010 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

VC++ build, Warning XDC0017 : Unrecognized XDCMake option: /validate

1. Add XML Documentation (http://msdn2.microsoft.com/en-us/library/ms177226.aspx) comments to your Visual C++ source code. 2. Enable the Process Documentation Comments switch (http://msdn2.microsoft.com/en-us/library/ms173501.aspx) (/doc) 3. Select "Yes /validate" for Validate IntelliSense on the XML Document Generator (http://msdn2.microsoft.com/en-us/library/ms235515.aspx) Tool Property Page. Result You get a warning during the build: Generating XML documentation... warning XDC0017 : Unrecognized XDCMake option: /validate XDCMAKE /old output_filename [options] (and a list of valid options...) Cause The XDCMake tool had, at one time, a /validate option in its old command line interface.  It was decided, due to weaknesses in its implementation, that its usefulness ... Read more..

February 1st, 2010 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

You receive error messages when you try to compile an MFC application by using the single-threaded run-time library in Visual C++: “Error LNK2001: unresolved external symbol”

When compiling an MFC application using the single-threaded run-time library, you receive the following two unresolved external error messages: nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol "__beginthreadex" nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol "__endthreadex" CAUSE loadTOCNode(1, 'cause'); Starting with version 3.0, all MFC classes are "thread safe" and require the multi-threaded run-time libraries to link successfully. Many people try to use the single-threaded run-time libraries because they assume these libraries are needed to enable the application to run in Win32s. This is not ... Read more..

January 27th, 2010 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

The screen repeatedly flashes to a blank text-mode screen when you build from the development environment in Visual C++

When you build from the development environment in Visual C++, the screen repeatedly flashes to a blank text-mode screen with no text on it. A text cursor may show up if you move the mouse while the blank screen is showing. The screen returns to Visual C++ and then blanks out again. The blanking occurs at least twice but possibly more times during the entire build process. CAUSE loadTOCNode(1, 'cause'); The default settings for the Command Prompt on Microsoft Windows Server ... Read more..

December 6th, 2009 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

You receive a “NMAKE : fatal error U1045: spawn failed : Invalid argument” error message when you compile a makefile by using the Microsoft Program Maintenance utility

When you compile a makefile by using the Microsoft Program Maintenance utility, Nmake.exe (NMAKE), you may receive the following error message: NMAKE : fatal error U1045: spawn failed : Invalid argument CAUSE loadTOCNode(1, 'cause'); NMAKE uses the command interpreter to spawn the different tools that are needed to build the targets. The path to the command interpreter is found by querying for the value of the ComSpec environment variable. If the ComSpec environment variable is set incorrectly, you receive the error message ... Read more..

December 6th, 2009 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

FIX: An ISAPI DLL is not registered when you run an ATL Server application that contains performance counters in Windows Vista

SYMPTOMS loadTOCNode(1, \\'symptoms\\'); A Microsoft Visual C++ 2005 Active Template Library (ATL) Server project contains performance counters. This project is configured to register an Internet Server API (ISAPI) DLL on a Windows Vista-based computer. However, the ISAPI DLL is not registered when you run the ATL Server application. Additionally, when you try to register the ISAPI DLL manually, you may receive an error message that resembles the following: 0x80070002 COR_E_FILENOTFOUND CAUSE loadTOCNode(1, \\'cause\\'); This problem occurs because the performance counter infrastructure in ... Read more..

December 3rd, 2009 admin Posted in Fixes, Vista HowTo No Comments »

AddThis Social Bookmark Button

BUG: Help topic for the java.io.PipedOutputStream class is not correct in Visual Studio .NET or in Visual Studio 2005

SYMPTOMS loadTOCNode(1, 'symptoms'); You have a Visual J++ project with a class that uses the java.io.PipedOutputStream object. When you convert your Visual J++ project to a Visual C# .NET project by using the Java Language Conversion Assistant (JLCA), the java.io.PipedOutputStream object is not converted completely in the Visual C# .NET or in Visual C# 2005 code that is generated. When you open the Microsoft Visual Studio .NET or Microsoft Visual Studio 2005 Help topic that is listed in the UPGRADE_ISSUE ... Read more..

October 30th, 2009 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

Error message in Visual C++ when you delete a pointer to a const object:

Attempting to delete a pointer to a constant causes the compiler to generate the following correct error message: Error C2710 : cannot delete a pointer to a const object NOTE: Visual C++ .NET compiler does not demonstrate this issue in conformance to the changes made in the C++ ANSI Standards. CAUSE loadTOCNode(1, 'cause'); Deleting a pointer to a constant should not be allowed by definition (ARM section 5.3.4) because it modifies the object pointed to. However, if you deliberately or accidentally use the ... Read more..

August 14th, 2009 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

Possible Reasons for OLE Control Registration Failure

SUMMARY loadTOCNode(1, \\'summary\\'); OLE controls can be registered by using Visual C++ from the Tools menu, from the Test Container provided with the Control Development Kit (CDK), or by using the regsvr or regsvr32 applications provided with Visual C++. In some cases, the registration of a control may fail; use this article to help troubleshoot the problem. MORE INFORMATION loadTOCNode(1, \\'moreinformation\\'); All of the previously mentioned methods for registering an OLE Control use essentially the same technique. LoadLibrary() is called to ... Read more..

July 30th, 2009 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

Applications Using Older ATL Components May Experience Conflicts With DEP

  An application that uses components built with ATL version 7.1 or earlier is built with the /NXCOMPAT (http://msdn2.microsoft.com/en-us/library/ms235442.aspx) switch, or is otherwise treated by the OS as being "No eXecute Compatible".  Installing Visual Studio 2008 can cause programs subsequently built with VS 2008 or VS 2005 to enable NX compatibility by default.  Also, if the DEP policy for the system is set to AlwaysOn, applications that incorporate the older thunking code will see this problem. Result The program may generate an access violation, due ... Read more..

June 20th, 2009 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

Problems when trying to setup remote debug across network domains

Action When remote debugging a windows application (windows form/service) across 2 networks, 2 machines on 2 different domains, you may get an error message similar to this one if there is a Network Address Translation (NAT) or a hardware firewall/router between the 2 machines. "Error while trying to run project: Unable to start debugging. The Visual Studio Remote Debugger on the target computer cannot connect back to this computer. A firewall may be preventing communication via DCOM to the local computer" Result Even after ... Read more..

June 20th, 2009 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

Access violation when class method is called via pointer-to-member-function for forward-declared class

A method is called through pointer and respective class is only forward declared. For example: class TestClass; void Disp(TestClass& rObj, void (TestClass::*pFun)()) { (rObj.*pFun)(); } Here ‘TestClass’ and function ‘Disp’ are in the same project, but defined in different .CPP files. Result The VC++ compiler compiles this without any errors, but the application fails with access violation exception (0xc0000005) during runtime at ‘(rObj.*pFun)();’.   Cause The representation of a pointer-to-member depends on the declaration of the class.  It can vary from a simple offset or pointer in the simple case to a complicated structure in ... Read more..

June 2nd, 2009 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

Error C2039: ‘GetAsDBTIMESTAMP’ : is not a member of ATL::COleDateTime

Action 1. Open Visual Studio 2005 or 2008 and create default MFC Single Document application. 2. Add the following code in the OnDraw() method of the wizard-generated custom view class: COleDateTime t = COleDateTime::GetCurrentTime(); DBTIMESTAMP ts; t.GetAsDBTIMESTAMP( ts ); // retrieves the time in t into the ts structure 3. Now compile the project. Result You receive the following error: "testoleview.cpp(59) : error C2039: 'GetAsDBTIMESTAMP' : is not a member of 'ATL::COleDateTime' C:\Program Files (x86)\Microsoft Visual Studio 8\VC\atlmfc\include\atlcomtime.h(104) : see declaration of 'ATL::COleDateTime'" [Even including the required header files in the View class does ... Read more..

May 11th, 2009 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

An error message occurs when you are performing intensive OLE Automation in a loop in Visual C++: “The remote procedure call failed”

You are performing intensive OLE Automation, most likely in a loop without user intervention, and receive the following error message: The remote procedure call failed. CAUSE loadTOCNode(1, 'cause'); Every thread that uses COM or OLE must call the CoInitialize function or the OleInitialize function, respectively. When this call is made, the OS creates a hidden top-level window, owned by your thread, for implementation purposes. Because the OS relies on Windows messaging behind-the-scenes, your thread should, and in some cases MUST, pump messages. ... Read more..

May 10th, 2009 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

Error message when you pass a lambda expression to a late-bound method call that is nested inside another late-bound method call in Visual Basic 2008: “Expression does not produce a value”

Consider the following scenario. In Microsoft Visual Basic 2008, you pass a lambda expression as a parameter to a late-bound method call. The late-bound method call is nested inside another late-bound method call. In this scenario, you receive the following error message: Expression does not produce a value RESOLUTION To resolve this problem, use one of the following methods. Method 1 Make the first method call an early bound method call by specifying the type for the first object. Method 2 Assign the lambda expression to a ... Read more..

March 8th, 2009 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

FIX: Visual Studio 2008 performance decreases when you step through source code that you downloaded from Reference Source Server

  In Microsoft Visual Studio 2008, when you step through the source code that you downloaded from Microsoft Reference Source Server, Visual Studio 2008 performance decreases. CAUSE This problem occurs because the source files are downloaded again every time that the debugger hits a breakpoint in the code. RESOLUTION   Hotfix information A supported hotfix is now available from Microsoft. But the hotfix is intended only to correct the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific ... Read more..

March 1st, 2009 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button

You may receive a “warning LNK4018″ warning message when you link a debug version of your application in Visual C++

When linking a debug version of your application, you may get the following warning message: LINK : warning LNK4018: too many type indexes in PDB "filename", discarding subsequent type information NOTE: You will not be able to see the subsequent types in the debugger. CAUSE loadTOCNode(1, 'cause'); The number of type indexes in the Program Database File (.pdb file) for your project exceeded 64K for Visual C++ 4.x and 16M for later versions. This is a limitation of the debugging format in a ... Read more..

December 18th, 2007 admin Posted in Fixes No Comments »

AddThis Social Bookmark Button