Microsoft KB Archive/131723

= PRB: WLL May Cause a GP Fault While Closing Word =

Article ID: 131723

Article Last Modified on 3/9/2005

-

APPLIES TO


 * Microsoft Office 2000 Developer Edition
 * Microsoft Word 6.0 Standard Edition
 * Microsoft Word 6.0a
 * Microsoft Word 6.0c

-



This article was previously published under Q131723



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

