0

I built a program using cBuilder, with an oleAuto interface to allow some client to make some simple query to the server com. I want to close the server when for some reason ( ex. the db connection is lost ) something is wrong and a I need to restart the server.

The problem is that if there are some clients connected through the COM reference I get a dialog that prompt me to confirm that I want to close this application.

Is there some way to avoid the dialog and force the closing of the server?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
enzo1959
  • 409
  • 2
  • 5
  • 13

1 Answers1

0

Well obviously you need to release all references to the object in order to properly close the server.

Were you unaware of that, or is there a reason why you need to hold on to the reference?

user1610015
  • 6,561
  • 2
  • 15
  • 18
  • I know I have also to manage correctly the reference to the server com, but I laso want to have an emergency solution to force the shutdown of an application when it has some critical problem. – enzo1959 Sep 19 '12 at 11:43
  • Well, that solution should involve releasing all references to all of the server's objects! It's not like it's gonna take a long time to do it. Oh and remember that you should also call CoUninitialize after releasing all references. – user1610015 Sep 19 '12 at 14:46