The information in this article applies to:
SYMPTOMSAttempting to build the ClassWizard-generated wrapper for the Word.Basic object by using the type library included with the Microsoft Word 95 Developer Kit (Wb70en32.tlb) results in this error:
CAUSEThis problem is actually caused by a macro defined in the Windows SDK header file Winuser.h. Winuser.h redefines ExitWindows() to map to the Win32 SDK API ExitWindowsEx(). This poses a problem for any C++ classes that need to implement a member function named ExitWindows(). The Word.Basic object exposes an automation method called ExitWindows(). When ClassWizard reads the type information contained in the Word type library (Wb70en32.tlb), it generates a class containing a member function called ExitWindows(). Attempting to compile this class generates the C4003 error. RESOLUTIONHere are two ways to work around this problem. If your application doesn't make use of the ExitWindows() SDK function, you can undefine the macro byincluding the following line of code before the definition of the class that contains the ExitWindows() member function.
However, a more straightforward workaround is to rename the ExitWindows() member function for the problem class. For example, rename WordBasic::ExitWindows() to WordBasic::_ExitWindows().
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. Additional query words:
Keywords : kbwizard kbMFC kbVC kbVC200 kbVC210 kbVC220 kbVC400 kbVC500bug kbVC600bug |
Last Reviewed: October 12, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |