|
Save the information from CreateProcess - the thread IF and process handle of each launched program.
A thread in your launcher app can WaitForMultipleObjects on each created process' handle, to later know when it has exited.
When I am trakcing multiple programs, I usually store information into a memory mapped file, and as each of the applications starts up, it sets information into the memory mapped file. If you also store the window handle or thread ID of your launcher app in the memory mapped file, then as each hosted program starts or stops, it can post a window or thread message to the launcher programs window or thread to notify the launcher of relevant activity.
No shirt, no shoes, no brains, no service.
|
|
|
|
|
|
Help.
I would like to impliment tty in my software. I have done it in the past using 'C'. Now I am using C++, how can I use tty.c in my c++ code? I presume I need to create a class. I cannot say I am an expert on C++, I am using VC++ V6.0. Any help would be gratefully appreciated.
tty is a sample supplied by Microsoft.
McSam
|
|
|
|
|
What do u mean by " tty " ?
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
"The COMM sample (TTY) demonstrates using the Win32 communications functions while maintaining a common code base with 16-bit Windows code."
It is a red herring really,it just happens to be the code I am struggling with using c++. I would like to use the SDK sample software supplied by microsoft in my c++ code. Perhaps it cannot be done? Perhaps I can only use sections of the code if I am lucky?
|
|
|
|
|
Hello-
In VC++, I am using shellexecute to run a batch file (which is composed of several .exe files and sets the path to a generated text file in the C:\ drive to display all the information from the .exe files [i.e. when psinfo.exe is run from the batch file, it writes to the (.txt), thus displaying all the information generated from psinfo.exe] and the batch file has several other executable calls that follow the same pattern of writing the information to the .txt file).
However, I am now trying to remove the batch file out of the equation. Basically I am trying to mimic the batch file to be executed using VC++ and I am confused about the following:
In the batch file I set the path with the following line--
set INFOPTH=C:\INFO.txt
-- and then throughout the batch file I direct all the information generated through the executables as follows --
psinfo.exe -d >>%INFOPTH%
-- so that I can easily view the information in txt format. So now what I want to do is implement this using VC++ in a UI that simply has an event handler that once clicked (i.e. Execute) will run just as the batch file does, of course without the dependency of the batch file...
I know this sounds some what simple, but I am very new the VC++ and would like some guidance as to how I would mimic the bath file's functionality, using VC++, especially how I would direct all my shellexecute function calls for the executables (i.e. psinfo.exe, etc.) to a path such as C:\INFO.txt.
To sum up... I need to know how to create the file (C:\INFO.txt) and direct all the information from the executables to that path using MFC and VC++ and not a simple .bat file.
Thank you for your help!
|
|
|
|
|
Lenny P wrote: To sum up... I need to know how to create the file (C:\INFO.txt) and direct all the information from the executables to that path using MFC and VC++ and not a simple .bat file.
See here and here.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I got a DLL, in its function declare their is a function:
EXPORT int func1();
But when I display it in Dependency Walker, the actual name is something
like:
_func1@0
This DLL is compiled in visual c++ 6.0, I am wondering if
there is an option cause this problem.
Thanks
|
|
|
|
|
jinzhecheng wrote: ...I am wondering if
there is an option cause this problem.
What problem? C functions are decorated with a leading underscore. Check whether you are using __cdecl or __stdcall .
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
did you ever look a what the compiler generates ?
this is called decorated names, exactly such as your func1() ...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
this is called decorated names, exactly such as your func1()...
I hope u mean Name Mangling by saying decorated names,
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
"decorated names" are more commonly used.
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1"> --[V]--
|
|
|
|
|
|
Thanks , I have created a def file, and its gone!
|
|
|
|
|
Hello,
This is what the C++ compiler does to your function names. The process is called name mangling[^]. You can use extern C to say to the compiler that you only wish to add an underscore to the function name. This disables any overloading..
extern "C"
{
void func1();
}
Hope this helps.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
I just installed VS 6.0 so I can learn C++ application programming. I'm using XP sp2 and everythign was working perfectly fine, but now after building any program [including those that worked fine before] when I run the debug executable it will promptly terminate and I get the following messages...
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINXP\system32\kernel32.dll', no matching symbolic information found.
The thread 0xCD4 has exited with code 4425000 (0x438528).
The program 'G:\Program Files\Microsoft Visual Studio\MyProjects\eosfirst03\Debug\eosfirst03.exe' has exited with code 4425000 (0x438528).
I've downloaded the win XP symbols and placed in the symbols folder of my windows install [c:\winxp] but to no avail. Debug .exe's that were compiled before I had this problem will still run fine. This happens even with a simple program like...
#include <iostream>
using namespace std;
int main()
{
cout << "blarg wtf";
}
the program runs and then terminates with the messages above. Whereas before it would run, and the window would remain open until I hit a key, now it just terminates. What gives, i'm lost =(
|
|
|
|
|
Perhaps your machine has a virus?
|
|
|
|
|
Nishant Sivakumar wrote: Perhaps your machine has a virus?
No, his machine does not have a virus. What is happening is standard behaviour. The program's he is writing are console based programs, and the console window is closing immediately after his program exits. If he wants to execute the program and see the output he should either use the "execute without debugging" command (shiftcontrol-F5 or the exclaimation point icon) or he should execute the app from an open command prompt window.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
-- modified at 15:06 Thursday 22nd December, 2005
|
|
|
|
|
Ah okay
I should have read his post fully! My bad!
|
|
|
|
|
originally though these programs were not quitting at completion, they would wait until I pressed a key. I have another project that is set up as win32 app and it's window terminates immediately after it opens [the window is up for no more than 1 frame], it's the contents of this tutorial http://www.andypike.com/tutorials/directx8/001.asp
I also still can't figure out how to get vs6 sp6 to use the XP symbols...
|
|
|
|
|
eos4life wrote: #include
using namespace std;
int main()
{
cout << "blarg wtf";
}
change it to
#include<iostream.h>
#include<conio.h>
void main()
{
cout<<" hello Alok";
getch();
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Have you installed SP5 for VS6?
--
I've killed again, haven't I?
|
|
|
|
|
i've installed sp6 actually
|
|
|
|
|
I want that when I press one ENTER KEY, to move to another field through my view.
Now I move by TAB KEY.
What to do ?
I learn my self
|
|
|
|
|
Try a combination of GetNextDlgTabItem(.....)
and PreTranslateMessage(...)
Hope this works...
Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too.
<marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" hspace="2" vspace="2">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|