Click to See Complete Forum and Search --> : Automation server will not shut down corrently


haoj
May 20th, 1999, 05:45 PM
Hi, experts. Need your help.

I am using VC++6.0(NT4.0) appwizard to create a FULL server with automation supported. It is a SDI server. I also added the Dual interface to my document class which derived from COleServerDoc. In Dual interface, I implemented a method ShowApp(SW_SHOW) which get the application's mainwnd and then call mainWnd->ShowWindow(SW_SHOW).
In client, I use #import "typelib" to declare a smart pointer. Using CreateInstance(..) to create the server and get IDualInterfacePtr then call ShowApp(SW_SHOW). After that, just release the IDualInterfacePtr. The server just won't shut down. If same as above, but not calling ShowApp(SW_SHOW), the server will shut down after release the IDualInterfacePtr pointer.

What did I do wrong?

Please help.

Thank you very much.