SOL9 Sample: ProcessInformation
|
1 Screenshot
2 Source code
/*
* ProcessInformation.cpp
* Copyright (c) 2015 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: 2 May 2016
Copyright (c) 2016 Antillia.com ALL RIGHTS RESERVED.