I need some pointers on how to debug a DDE issue with Word. Its a bit of a mess as you'll see, but I do have some very specific questions at the end.
I have a large CVI program that uses DDE to generate Word documents. It inserts text files and pastes graphics copied from a CVI panel. It has worked well until XP came along - with WinXP and Office XP Word hangs the second time ClientDDEExecute is used to send a FileSaveAs command. (It stops responding with the message in the bottom left of the status bar saying "Saving ____.doc")
Strangely, if I put a "Delay(2.);" before the save command, Word does not hang. BUT I now get a GPF on a later DiscardPanel call. Adding "Delay(2.)" before all ClientDDEExecute calls does not cure the GPF.
I've used msconfig to load only the essentials, with no success. It happens in and out of the debug environment.
But if I "fake" all DDEClientExecute calls to a dummy function the GPF does not happen, so I think it's Word related.
And this problem never happens with Word 97 - just Word 2002.
So my questions are:
1. Is there any potential problem with issuing a ClientDDEExecute command before the server (Word 2002) is done with the previous command? Word 2002 sometimes repaginates several times in a row and it can take some time, esp. with a big file (<100 pages).
(If there is a timing issue, can I use a warm or hot link to Word to know when to send the next command? What "Item Name" would I monitor?)
2. What can I do to debug the GFP? Atttempts to pare down the large program to a simple one that replicates the problem have been difficult & unsucessful to date.
Thanks in advance for any help!