Programming, System Programming, Win32, C.
#include <stdlib.h> #include <Windows.h> void ExitSys(LPCTSTR lpszMsg, int status); int main(void) { HANDLE hFile; char buf[1024 + 1]; DWORD dwRead, dwWritten; if ((hFile = CreateFile("test.dat", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL)) ==