July 25th, 2013, 05:00 PM
Sending p32 to header file .h and .cpp
I'm back to programming after a longer break and as always I got some problems.
So I made basic process scanner, that shows all running processes, and gives more info (PID, etc) on a selected one.
This looks like this
wcout << "\n Name of the process : " << pe32.szExeFile;
if (strcmp (specyficname , pe32.szExeFile ))
//if (strcmp ("alg.exe" , pe32.szExeFile ))
wcout << " FOUND" << endl;
wcout << " \n Process ID : " << pe32.th32ProcessID ;
wcout << "\n Thred count : " << pe32.cntThreads ;
wcout << "\n Parent process id : " << pe32.th32ParentProcessID ;
wcout << "\n Priority base : " << pe32.pcPriClassBase << endl ;
And now, I'm going to do what I never used much before (shame!) -> use header files.
I know how it should work, can make lets say a separet .h and .cpp files that will show text, or do some maths, but...
What I want now is to send the pe32 values like PID, ProcessName, PartenProcessID to the created function to make all these values display there, not in main code.
At first i fought it should look like
myfunciton (pe32.th32ProcessID, ...); tried various options like with hProcessSnap
but it gives arror 'Too many arguments in function to call. '
So it how to do this. What should I do to send those parameters to h/cpp file?
// what declaration?
July 25th, 2013, 08:31 PM
Re: Sending p32 to header file .h and .cpp
The question doesn't make sense as asked. You don't send variable to files. Post real code with real errors and a better explanation of what you're trying to do.
Click Here to Expand Forum to Full Width