Subject | AW: [firebird-support] Command line options |
---|---|
Author | Klement Guenther - Munich-MR |
Post date | 2003-10-20T06:24:36Z |
> Actually what my requirement is that I want to start fbserverthe fbserver should have an option to handle the shutdown well.
> whenever my
> client application starts and stop it when the user quits the client
> application. It should be very much transparent to the
> client. Therefore,
There seems to be a need for an autostop option in fbserver, Isn't it?
> //If we started the process, lets attempt to terminate itThis might be slightly better, but my leave the fbserver running.
> as well....
> if( s_pi.hProcess != NULL && s_pi.hThread != NULL )
> {
> TerminateProcess( s_pi.hProcess, 0 );
> CloseHandle( s_pi.hThread );
> CloseHandle( s_pi.hProcess );
> }
> }
void db_test_stop_local_server(char* user, char* passwd)
{
HWND hWnd = NULL;
disconnect();
// check if there are other connections via isc_info_svc_svr_db_info
if (db_cnt_active_attachments(user, passwd) == 0 )
{
hWnd = FindWindow(szClassName, APP_NAME);
if (hWnd) {
PostMessage(hWnd, WM_CLOSE, 0, 0);
}
}
Regards
Guenther