WLL May Cause a GP Fault While Closing Word

Last reviewed: August 5, 1997
Article ID: Q131723
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c

SYMPTOMS

A WLL created using the CAPI may cause a general protection (GP) fault while closing Word.

CAUSE

This problem can occur if the WLL tries to subclass Word by unloading the WLL while it's responding to a message.

For example, if you are processing the WM_CLOSE command and call the following CAPI code, a GP fault may occur:

InitWCB( &wcb, 0, NULL, 0 ); AddStringParam( &wcb, "c:\\winword\\subclass.wll" ); wdCommandDispatch( wdDeleteAddIn, 0, wcb.cArgs, wcb.wdoprArgs, lpwdoprNil);

You cannot unload the WLL or un-subclass Word when the WLL contains the code that is responding to the message. More precisely, you cannot terminate the WLL while it is in the middle of responding to the WM_CLOSE message.

STATUS

This is a design feature of Windows.

MORE INFORMATION

Windows sends the WM_CLOSE message to a program when you choose the Close command from the System menu.

REFERENCES

Microsoft Windows SDK "Guide to Programming, Part 2"


KBCategory: kbenv kbprg
KBSubcategory:
Additional reference words: 6.0 6.0a 6.0c gp fault gpf general
word6 protection fault application error capi
Keywords : kbenv kbprg
Version : 6.0 6.0a 6.0c
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.