Try adapting this code to stop the server:
#define IDM_SHUTDOWN 5 //From iscguard/iscguard.rh
hTmpWnd = FindWindow("IB_Guard", "InterBase Guardian");
if (hTmpWnd == NULL)
hTmpWnd = FindWindow("IB_Server", "InterBase Server");
if (hTmpWnd != NULL)
PostMessage(hTmpWnd, WM_COMMAND, (WPARAM) IDM_SHUTDOWN, 0);
> -----Original Message-----
> From: firebird-devel-admin@...
> [mailto:firebird-devel-admin@... Behalf Of Claudio
> Valderrama C.
> Sent: 27 April 2003 09:40
> To: firebird-devel@...
> Subject: RE: [Firebird-devel] Starting and Stopping Server
> Jason Hunter wrote:
> > I am developing a java app and hope to use firebird as an internal
> > database to this app. I know the command line to start a firebird
> > server in a win32 environment as both an aplication and a service.
> > How does one stop the server (short of killing the process)?
> I assume you know how to stop a service properly.
> Now, to stop FB running as an app (started with -a), you'll need to check
> that there's no attachment and then kill it. There's an API call
> to shutdown
> the engine, but it's commented out in the code. I assume it's
> because it was
> deemed a security hole.
> > Is there a good listing of command line arguments for the server (so I
> > can change the port it listens on or its default data directory)?
> There are only a few command line flags. If you want to do more,
> you'll have
> to tweak the configuration file.
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.