Re: This works, but I don't know why :)
- From: "N:dlzc D:aol T:com \(dlzc\)" <dlzc1@xxxxxxx>
- Date: Wed, 26 Nov 2008 19:58:38 -0700
Hello Klas,
"Klas Engwall" <klas.engwall@xxxxxxxxxxxxx> wrote in message
news:492dc244.7463792@xxxxxxxxxxxxxxxx
OK, found it. The first question is Who will perform
that registry hack on every user's computer? The
second question is Why mess with it? The third
question is Why bother? MSDOS programs aren't
exactly the future of programming.
Someone wanted to know how it could be done with
Clipper. I completely agree with you.
I was waiting for you to say "Switch to xHarbour
instead" <g>
Oh. I am a little slow. And this problem then has additional
avenues of detection using xHarbour, but it is still non-trivial.
I think we had a discussion on this topic there just about the
time we switched from xharbour.com's own newsgroup server to
comp.lang.xharbour.
....
*** another tack at this probelm ***
I wonder if the application program itself is still
locked, as it was under MS-DOS?
You mean like if you tried to delete a running
exe and got an Access denied error?
More like fopen with exclusive access turned on.
Well, I think we both mean the same thing. And I
have now tested the following:
I think that depends on how it was linked. If
there are overlays still on disk the exe needs
to be kept open to load them.
My Clipper exes, all overlaid, are always open
while running.
Have an active lock? That is all he was looking for... not *any*
executable but "a way to find running clipper programs".
But a small 16-bit utility like pkzip.exe is not and
can be renamed or deleted or whatever while it is
running. That could mean that your simple
program that tries to obtain an exclusive lock on
the main application program may or may not
know what it is doing.
Should, as along as it is Clipper code if I read your response
correctly. And it requires two programs operated from a batch
file. One to apply feelers, and then the main application. Of
course, if the main application checked the lock, and terminated
if it could not obtain...
So we first need to know if the application is
running. Now ... how can we do that? It looks
like there is a hole in the bucket <BG>
If the executable does not always have a lock on it, make this
operation the first step in execution. Locks should be released
no matter how the code terminates. It can find its location from
its commandline (as I recall, correctly or not ;>).
This will only work if the code only exists one place on a
machine, or is executed from a single directory on a file server
for this one machine.
Now the question is, what does he want to happen if an instance
of the program is found? Bring it to the foreground?
David A. Smith
.
- Follow-Ups:
- Re: This works, but I don't know why :)
- From: Klas Engwall
- Re: This works, but I don't know why :)
- References:
- Re: This works, but I don't know why :)
- From: Andreas Moroder
- Re: This works, but I don't know why :)
- From: Klas Engwall
- Re: This works, but I don't know why :)
- From: dlzc
- Re: This works, but I don't know why :)
- From: Klas Engwall
- Re: This works, but I don't know why :)
- From: N:dlzc D:aol T:com \(dlzc\)
- Re: This works, but I don't know why :)
- From: Klas Engwall
- Re: This works, but I don't know why :)
- From: N:dlzc D:aol T:com \(dlzc\)
- Re: This works, but I don't know why :)
- From: Klas Engwall
- Re: This works, but I don't know why :)
- Prev by Date: Re: This works, but I don't know why :)
- Next by Date: Test management system integrated with JIRA and Bugzilla
- Previous by thread: Re: This works, but I don't know why :)
- Next by thread: Re: This works, but I don't know why :)
- Index(es):
Relevant Pages
|