SOL9 2.0 Sample: ProcessInformation

SOL9 2.0 Samples

1 Screenshot


2 Source code

/*
 * ProcessInformation.cpp 
 * Copyright (c) 2009 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// SOL9
// 2009/09/15
#include <sol/ProcessInformation.h>

void _tmain(int argc, TCHAR** argv)
{
    try {
        DWORD pid = GetCurrentProcessId();
        
        if (argc ==2) {
            //pid = atoi(argv[1]);
            TCHAR* pos =NULL;
            pid = strtol(argv[1], &pos, 10);
        }
        
        if (pid >0) {
            ProcessInformation information(pid);

            information.display();
        } else {
            _tprintf(_T("Invalid PID : %s. It must be an integer.\n"), argv[1]);
        }
    } catch (...) {
        printf("Exception\n");
    }
}

Last modified: 11 Nov 2009

Copyright (c) 2009 Antillia.com ALL RIGHTS RESERVED.