Click here to Skip to main content
15,910,877 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCalling child class methods from parent class pointers Pin
mjackson115-Mar-09 17:41
mjackson115-Mar-09 17:41 
AnswerRe: Calling child class methods from parent class pointers Pin
«_Superman_»5-Mar-09 17:48
professional«_Superman_»5-Mar-09 17:48 
GeneralRe: Calling child class methods from parent class pointers Pin
mjackson116-Mar-09 4:59
mjackson116-Mar-09 4:59 
Questionstring class help needed Pin
CHYGO5-Mar-09 16:36
CHYGO5-Mar-09 16:36 
AnswerRe: string class help needed Pin
Naveen5-Mar-09 16:52
Naveen5-Mar-09 16:52 
GeneralRe: string class help needed Pin
CHYGO5-Mar-09 19:45
CHYGO5-Mar-09 19:45 
GeneralRe: string class help needed Pin
CHYGO5-Mar-09 20:18
CHYGO5-Mar-09 20:18 
GeneralRe: string class help needed Pin
Naveen5-Mar-09 20:22
Naveen5-Mar-09 20:22 
hmm..

I modified you code a little.Just changed the szProcessName to TCHAR.

void PrintProcessNameAndID( DWORD processID )
{
     TCHAR  szProcessName[MAX_PATH];
    // Get a handle to the process.
    HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |
                                   PROCESS_VM_READ,
                                   FALSE, processID );
    // Get the process name.
    if (NULL != hProcess )
    {
        HMODULE hMod;
        DWORD cbNeeded;

        if ( EnumProcessModules( hProcess, &hMod, sizeof(hMod), 
             &cbNeeded) )
        {
            GetModuleBaseName( hProcess, hMod, szProcessName, 
                                                       MAX_PATH);
        }
        if(lstrcmp(szProcessName, "smss.exe"))
		_tprintf( TEXT("%s  (PID: %u)\n"), szProcessName, processID );
    }

    CloseHandle( hProcess );
}



GeneralRe: string class help needed Pin
CHYGO5-Mar-09 21:06
CHYGO5-Mar-09 21:06 
GeneralRe: string class help needed Pin
David Crow6-Mar-09 3:31
David Crow6-Mar-09 3:31 
QuestionIs Volume online and ready? Pin
Peter Weyzen5-Mar-09 14:59
Peter Weyzen5-Mar-09 14:59 
QuestionRational Number constructor Pin
aab199025-Mar-09 13:20
aab199025-Mar-09 13:20 
AnswerRe: Rational Number constructor Pin
Cedric Moonen5-Mar-09 20:22
Cedric Moonen5-Mar-09 20:22 
QuestionRe: Rational Number constructor Pin
CPallini5-Mar-09 21:09
mveCPallini5-Mar-09 21:09 
QuestionRe: Rational Number constructor Pin
David Crow6-Mar-09 3:40
David Crow6-Mar-09 3:40 
QuestionIterating string to add escape sequence. Pin
mmayur5-Mar-09 11:27
mmayur5-Mar-09 11:27 
AnswerRe: Iterating string to add escape sequence. Pin
«_Superman_»5-Mar-09 17:22
professional«_Superman_»5-Mar-09 17:22 
QuestionRe: Iterating string to add escape sequence. Pin
David Crow6-Mar-09 3:43
David Crow6-Mar-09 3:43 
QuestionFirst C++ class Pin
aab199025-Mar-09 11:18
aab199025-Mar-09 11:18 
AnswerRe: First C++ class Pin
Yusuf5-Mar-09 11:29
Yusuf5-Mar-09 11:29 
GeneralRe: First C++ class Pin
aab199025-Mar-09 11:36
aab199025-Mar-09 11:36 
GeneralRe: First C++ class Pin
Yusuf5-Mar-09 11:55
Yusuf5-Mar-09 11:55 
QuestionRe: First C++ class Pin
Maximilien5-Mar-09 11:39
Maximilien5-Mar-09 11:39 
AnswerRe: First C++ class Pin
aab199025-Mar-09 12:01
aab199025-Mar-09 12:01 
QuestionTo Host a Dot net control(C# or WPF) in MFC 6(VC6) Dialog Pin
Jaskaran815-Mar-09 9:53
Jaskaran815-Mar-09 9:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.