• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

How to Detect IBGuard?

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
MVM_BR
Asked:
MVM_BR
1 Solution
 
nestoruaCommented:
HI,
Use Process32First, Process32Next and  CreateToolhelp32Snapshot for your purpose.
Sincerely,
Nestorua.
0
 
VSFCommented:
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
 
pnh73Commented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now