Friday, July 30, 2010

OverWrite. A program to inject random lines between original lines of a file.

//OverWrite21.c
//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.
//

Programa juguete para recordar comportamiento de buffers en C.

//toy_buffers.c
//A toy program to test buffer behaviours.
//30-JUL-2010


//include libraries
#include
#include
#include
#include

#include
#include

#include


//define constants and macros
#define BUFFERSIZE 1024


//define functions prototypes
void fPutGetBuffer(char[], char[]);


//
// 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.
//