bglat-
Sounds like maybe you're not getting the ActiveX server for Word shut down before you're terminating your process. The C runtime is probably notifying the ActiveX Server object that the process is terminating, and that is going to leave it hung up (suspended). When you return from main, the C runtime environment is making a TerminateProcess () system call on your behalf, and the TerminateProcess logic is doing the suspend notification to the Word ActiveX server object. I suspect the reason Windows does a popup error message is because if the thread running the ActiveX server gets suspended, and there aren't any other references to the Server Object, how would it ever come out of suspension - it would sit there forever, conceivably. Though if the reference count on a handle goes to zero, the OS should kill the object for you.
Are you making this call before you terminate your process?
iStatus = WordRpt_ApplicationQuit (hWord, WRConst_SaveChanges or WRConst_DoNotSaveChanges or WRConst_PromptToSaveChanges);
Plus, you should discard the handle with
CA_DiscardObjHandle (hWord);
But as the process terminates, this will happen automagically. Just don't try to reuse the handle once you've shut down the word server.
We used to have trouble in this area with Excel and ActiveX from CVI - Excel would stay running even as we quit the process. I think NI fixed some things up to make it shut down properly some years ago.
Menchar