将生成的数据写入文件

    char* pBuffer=NULL;
    pBuffer=(char *)malloc(8196*10000);
    memset(pBuffer,0,8196*10000);

    sslClient2(SERVER_IP,SERVER_PORT,
        (char *)http_request.c_str(),http_request.length(),pBuffer,8196*10000);

    HANDLE hFile=INVALID_HANDLE_VALUE;
    DWORD dwRead=0;
    hFile=CreateFileA("1.txt",FILE_WRITE_ACCESS,NULL,NULL,OPEN_ALWAYS,NULL,NULL);
    WriteFile(hFile,pBuffer,strlen(pBuffer),&dwRead,0);
    CloseHandle(hFile);

 

posted on 2015-04-27 15:00  寻步  阅读(248)  评论(0编辑  收藏  举报