//A program to inject random lines between original lines of a file.
//30-JUL-2010
//include headers and libraries
#include
#include
#include
#include
#include
#include
#include
//define constants and macros
#define BUFFERSIZE 1024
//declare functions prototypes
void DisplayError(LPTSTR lpszFunction);
int fReadTheFile(LPCTSTR, char[]);
void fWriteTheFile(LPCTSTR, char[]);
void fCloseFile(HANDLE);
//
// Note: this simplified sample assumes the file to read is an ANSI text file
// only for the purposes of output to the screen. CreateFile and ReadFile
// do not use parameters to differentiate between text and binary file types.
//