728x90
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
static DWORD dwVal = 0x21;
DWORD dwSeed = (dwVal++ << 0x18) | (ft.dwLowDateTime & 0x00ffff00) | dwVal++ & 0x000000ff;
srand(dwSeed);
int iRandom = rand()%10+1;
728x90
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
static DWORD dwVal = 0x21;
DWORD dwSeed = (dwVal++ << 0x18) | (ft.dwLowDateTime & 0x00ffff00) | dwVal++ & 0x000000ff;
srand(dwSeed);
int iRandom = rand()%10+1;