-
July 25th, 2013, 04:00 PM
#1
Sending p32 to header file .h and .cpp
Hello everyone
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
Code:
wcout << "\n Name of the process : " << pe32.szExeFile;
if (strcmp (specyficname , pe32.szExeFile ))
//if (strcmp ("alg.exe" , pe32.szExeFile ))
{
}
else
{
wcout << " FOUND" << endl;
tekstor (pe32,);
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?
Code:
#ifndef wydruk_H_
#define wydruk_H_
// what declaration?
#endif
Woozi
-
July 25th, 2013, 07:31 PM
#2
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|