#include "TestFuns.h" #include #include #include #include int ToFile(const char *pFileName, const void *pData, int nLenght) { FILE* fp = fopen(pFileName, "wb"); if (fp != 0) { fwrite((const char *)pData, 1, nLenght, fp); fclose(fp); return 0; } return -1; } int ABFile(const char *pFileName, const void *pData, int nLenght) { FILE* fp = fopen(pFileName, "ab+"); if (fp != 0) { fwrite((const char *)pData, 1, nLenght, fp); fclose(fp); return 0; } return -1; }