Help and Support
 

powered byLive Search

BUG: C4003 When Building Wrapper For Word.Basic 7.0 Object

Article ID:148223
Last Review:March 9, 2005
Revision:3.1
This article was previously published under Q148223

SYMPTOMS

Attempting 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:
warning C4003: not enough actual parameters for macro 'ExitWindows'

Back to the top

CAUSE

This 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.

Back to the top

RESOLUTION

Here 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.
   #undef ExitWindows
				
However, a more straightforward workaround is to rename the ExitWindows() member function for the problem class. For example, rename WordBasic::ExitWindows() to WordBasic::_ExitWindows().

Back to the top

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

Back to the top


APPLIES TO
Microsoft Visual C++ 2.0 Professional Edition
Microsoft Visual C++ 2.1
Microsoft Visual C++ 2.2
Microsoft Visual C++ 4.0 Standard Edition
Microsoft Visual C++ 5.0 Enterprise Edition
Microsoft Visual C++ 6.0 Enterprise Edition
Microsoft Visual C++ 5.0 Professional Edition
Microsoft Visual C++ 6.0 Professional Edition
Microsoft Visual C++, 32-bit Learning Edition 6.0

Back to the top

Keywords: 
kbbug kbwizard kbpending KB148223

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by E-mail, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.