Description // Info
Source Code
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <stdio.h>
#include <Winioctl.h>//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;
}
Comments
You must be logged in to post comments.
|
|