Programming, System Programming, Win32, C.
INVALID_HANDLE_VALUE) ExitSys("CreateFile", EXIT_FAILURE); if (!ReadFile(hFile, buf, 1024, &dwRead, NULL)) ExitSys("ReadFile", EXIT_FAILURE); buf[dwRead] = '\0'; puts(buf); strcpy(buf, "xxxxx"); if (!WriteFile(hFile, buf, 5, &dwWritten, NULL)) ExitSys("WriteFile", EXIT_FAILURE); CloseHandle(hFile);