Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- int main()
- {
- byte buffer[1] = { '\0' };
- auto hFile = CreateFileW(L"c:\\temp\\extracted-file", GENERIC_WRITE, FILE_SHARE_DELETE,
- NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- SetFilePointer(hFile, 999999, NULL, FILE_BEGIN);
- WriteFile(hFile, buffer, 1, NULL, NULL);
- SetFilePointer(hFile, 0, NULL, FILE_BEGIN);
- // do real extraction here
- CloseHandle(hFile);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement