BUG: Win32Cmi Sample Fails or Gives Wait Timeout Error (216660)



The information in this article applies to:

  • Microsoft Office XP Developer
  • Microsoft Office 2000 Developer
  • Microsoft Word Developer's Kit 95
  • Microsoft Word 2002
  • Microsoft Word 2000
  • Microsoft Word 97 for Windows

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.

Modification Type:MajorLast Reviewed:12/12/2003
Keywords:kbbug kbpending KB216660