Solved

How to Detect IBGuard?

Posted on 2002-04-05
3
158 Views
Last Modified: 2010-04-04
How to make sure IbGuard is running on my Windows98 and XP?

When my app starts I want to be able to detect IBGuard running to ensure the database access can be done.
I tried this code, to detect IbGuard when its minimized on the tray:
     
var
 hwind:HWND;

hwind := 0;
hwind:=windows.FindWindow('#32770', 'IbGuard');
if (hwind=0) then
 MessageBox(0, 'Ibserver NOT Detected'
           ,'Atention!', mb_iconInformation)
else
 MessageBox(0, 'IbGuard Detected'
           ,'Atention!', mb_iconInformation);

This does not work.
But when I double click the IbGuard and the window comes up, I can detect it by using:

hwind := 0;
hwind:=windows.FindWindow('#32770', 'Propriedades de InteBase Guardian');
if (hwind=0) then
 MessageBox(0, 'Ibserver NOT Detected'
           ,'Atention!', mb_iconInformation)
else
 MessageBox(0, 'IbGuard Detected'
           ,'Atention!', mb_iconInformation);

Thanks!
Samples are welcome!

MVM_BR
www.enge.cjb.net
0
Comment
Question by:MVM_BR
3 Comments
 
LVL 4

Accepted Solution

by:
nestorua earned 100 total points
ID: 6921621
HI,
Use Process32First, Process32Next and  CreateToolhelp32Snapshot for your purpose.
Sincerely,
Nestorua.
0
 
LVL 3

Expert Comment

by:VSF
ID: 6923811
nestorua:
Any samples on how to do that?!
I'm also trying to do so with no success

VSF
www.victory.hpg.com.br
www.boatoda.hpg.com.br
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9002899
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept answer from nestorua

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi Firemonkey Need Sample for Online Shopping Example. 2 191
Working with hours 3 72
How to build JSON File in Delphi 6 3 67
Firemonkey BASS_Init into a thread 17 51
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question