CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2013
    Posts
    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

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    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
  •  





Click Here to Expand Forum to Full Width

Featured