Microsoft KB Archive/216660

= BUG: Win32Cmi Sample Fails or Gives Wait Timeout Error =

Article ID: 216660

Article Last Modified on 1/24/2007

-

APPLIES TO


 * Microsoft Office XP Developer Edition
 * Microsoft Office 2000 Developer Edition
 * Microsoft Word Developer's Kit 95
 * Microsoft Word 2002 Standard Edition
 * Microsoft Word 2000 Standard Edition
 * Microsoft Word 97 Standard Edition

-



This article was previously published under Q216660



SYMPTOMS
The Win32CMI DLL that ships with the Word Developer's Kit either fails to work properly, or returns an error value of -9 (WaitForSingleObject timeout).



CAUSE
The Win32CMI sample project contains a logic error in the way it handles messages in its hook procedure, LGetMsgProc.



RESOLUTION
Open the Win32Cmi.c file and change the following line in LGetMsgProc:

if (((LPMSG)lParam)->message == vshared.wmIPC && wParam != PM_NOREMOVE)

to:

if (((LPMSG)lParam)->message == vshared.wmIPC && (wParam & PM_REMOVE))

Then re-compile the Win32CMI project to create a new Win32CMI.DLL. Replace your old Win32CMI.DLL with this one.



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

Additional query words: capi cmiCommandDispatch wdCommandDispatch wll

Keywords: kbbug kbpending KB216660

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.