BUG: Win32Cmi Sample Fails or Gives Wait Timeout Error

ID: Q216660


The information in this article applies to:


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 this to be a problem in the Microsoft products listed at the beginning of this article.

Additional query words: capi cmiCommandDispatch wdCommandDispatch wll


Keywords          : kbSDKWord kbWord kbGrpDSO kbOffice2000 
Version           : WINDOWS:95
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: June 1, 1999