#define _WIN32_WINNT 0x0501 /*Windows API版本*/
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <winbase.h>
#include <Wincon.h>
#include <tlhelp32.h>
#include <malloc.h>
#include <string.h>
#include <direct.h>
#include "WinShell.h"
void ftime(FILETIME filetime)
{
SYSTEMTIME systemtime;
if (filetime.dwLowDateTime==-1)
{
wprintf(L"Never Expires");
}
else
{
if (FileTimeToLocalFileTime(&filetime,&filetime)!=0)
{
if (FileTimeToSystemTime(&filetime,&systemtime)!=0)
{
char str[50];
wsprintf(str,"%d-%02d-%02d %02d:%02d",systemtime.wYear,systemtime.wMonth,systemtime.wDay,systemtime.wHour,systemtime.wMinute);
printf("%s",str);
}
else
{
wprintf(L"FileTimeToSystemTime failed");
}
}
else
{
wprintf(L"FileTimeToLocalFileTime failed");
}
}
}
void GetProcessList()
{
HANDLE hProcessSnap=NULL;
PROCESSENTRY32 pe32={0};
hProcessSnap=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
if (hProcessSnap==INVALID_HANDLE_VALUE)
printf("\nCreateToolhelp32Snapshot() failed:%d",GetLastError());
pe32.dwSize=sizeof(PROCESSENTRY32);
if (Process32First(hProcessSnap,&pe32))
{
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <winbase.h>
#include <Wincon.h>
#include <tlhelp32.h>
#include <malloc.h>
#include <string.h>
#include <direct.h>
#include "WinShell.h"
void ftime(FILETIME filetime)
{
SYSTEMTIME systemtime;
if (filetime.dwLowDateTime==-1)
{
wprintf(L"Never Expires");
}
else
{
if (FileTimeToLocalFileTime(&filetime,&filetime)!=0)
{
if (FileTimeToSystemTime(&filetime,&systemtime)!=0)
{
char str[50];
wsprintf(str,"%d-%02d-%02d %02d:%02d",systemtime.wYear,systemtime.wMonth,systemtime.wDay,systemtime.wHour,systemtime.wMinute);
printf("%s",str);
}
else
{
wprintf(L"FileTimeToSystemTime failed");
}
}
else
{
wprintf(L"FileTimeToLocalFileTime failed");
}
}
}
void GetProcessList()
{
HANDLE hProcessSnap=NULL;
PROCESSENTRY32 pe32={0};
hProcessSnap=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
if (hProcessSnap==INVALID_HANDLE_VALUE)
printf("\nCreateToolhelp32Snapshot() failed:%d",GetLastError());
pe32.dwSize=sizeof(PROCESSENTRY32);
if (Process32First(hProcessSnap,&pe32))
{