|
#include "stdafx.h"
#include <windows.h>
int main(int argc, char* argv[])
{
FILE *fp;
fp = fopen( "version.dat", "wb" );
if ( fp == NULL ) {
printf( "%s がOPENできませんでした\n", "version.dat" );
return 0;
}
OSVERSIONINFO osvi;
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx((OSVERSIONINFO*)&osvi);
fwrite( (void *)&osvi, sizeof( osvi ), 1, fp );
fclose( fp );
return 0;
}
| |