How to check if RPC Server is available [modified]
-
Hi I have a problem working with MS Word interop.I create an instance of Word Application and I want to use it as a singleton object ( so I don't have to create another word application as long as a user is working with my application) But if user opens a word document it will be opened using the word app instance that I've created and when he/she quits the word the word instance is gone thus I have a reference to a rpc server that is not available anymore and if i try to do somthing with it a RPC server is unavalilable exception will be thrown. How can I check to see if a particular RPC server is still available? Thanks alot -- modified at 4:01 Saturday 14th July, 2007
-
Hi I have a problem working with MS Word interop.I create an instance of Word Application and I want to use it as a singleton object ( so I don't have to create another word application as long as a user is working with my application) But if user opens a word document it will be opened using the word app instance that I've created and when he/she quits the word the word instance is gone thus I have a reference to a rpc server that is not available anymore and if i try to do somthing with it a RPC server is unavalilable exception will be thrown. How can I check to see if a particular RPC server is still available? Thanks alot -- modified at 4:01 Saturday 14th July, 2007
The only way to check whether a cross-process object still works is to make a call to that object. I'm not sure if Word offers a way for you to request that it should keep running even if the user closes the last frame window. I actually thought applications were supposed to keep running while there were still outstanding references - ensure you're not calling
Marshal.ReleaseComObject
anywhere.Stability. What an interesting concept. -- Chris Maunder
-
The only way to check whether a cross-process object still works is to make a call to that object. I'm not sure if Word offers a way for you to request that it should keep running even if the user closes the last frame window. I actually thought applications were supposed to keep running while there were still outstanding references - ensure you're not calling
Marshal.ReleaseComObject
anywhere.Stability. What an interesting concept. -- Chris Maunder
Thank you. I don't use Marshal.ReleaseComObject and I don't release the app reference that I've got either but It happens.