Supend and Resume Question

delphi package - easy access to kernel objects etc.
Locked
bluewolf
Posts: 1
Joined: Wed Aug 18, 2004 4:22 pm

Supend and Resume Question

Post by bluewolf »

-=-=-=-=-
delphi v6 personal
program run on win9X,me,2k,xp
not exactly sure what version of made kernal. Installed it maybe a month ago from the wesite.

everything else will vary from
end user to end user.
-=-=-=-=-

Process('program.exe').Suspend;
Process('program.exe').Resume;

vs

Process(ProcessInfo.hProcess).Supend;
Process(ProcessInfo.hProcess).Resume;

telnet user -> vr32 -> node1 thread -> createprocess -> mSyncFos ->
createprocess -> BBS


I run a multi threaded application and in each of those threads it
launchs an application that creates it own threads to launch a another
application. Well, if I use Process('program.exe').Resume when i call
resume it return's fine, but when I call Process('program.exe').Supend it
supends all the other applications that are run with the same name also.
So, all node1-X that createprocess(.. mSyncFos ..) are supended, but
the resumes resumes all of them which is okay, but not okay.

So, I tried the second metheod to just get the process that the thread
created to supend, but in doing so. I don't think the process's the
second program launch'd is supended along with it and is still running.
Which in this program is bad. Cause if the BBS isn't supended along
with mSyncFos the BBS return's the user has drop'd carrier and exits
out, but if the bbs is supended along with mSyncFos then it doesn't
get a chance to detect the process was supended or return a drop
user.

If you need more info. Just ask, but it's long
and I thought I would stick with the short version.

Well, the reason I do this is, because when the user is on
the bbs and signals that it wants to run another program
the bbs connection needs to be froze. So vr32 can
then create another process and hot swap the telnet session
to the other program then back again after the other
program has finish rnning. No, I didn't program mSyncFos
so I can't go in and program a switch to look for when
the other program is running and supend itself. That is
why I turn'd towards madKernal for help on this.

So, the question is this. What does 'program.exe' do different then
(processinfo.hprocess) do?

Does ('msynchfos.exe').supend also supend the process mysyncfos.exe
has created?

thank-you for your time.

Bluewolf :?
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Please do not post the same question on both the forum and the newsgroup. Thread locked.
Locked