Answer the question
In order to leave comments, you need to log in
I need to write to the output stream instead of writing to a file, how to do it?
There is a code
int RealDataCallBack_V2(long lRealHandle, const PACKET_INFO_EX *pFrame, unsigned int dwUser)
{
fwrite(pFrame->pPacketBuffer,1,pFrame->dwPacketSize,g_pFile);
}
Answer the question
In order to leave comments, you need to log in
$ ll
total 12
drwxrwxr-x 2 saboteur saboteur 4096 Feb 10 09:49 ./
drwxr-xr-x 11 saboteur saboteur 4096 Feb 10 09:48 ../
-rw-rw-r-- 1 saboteur saboteur 132 Feb 10 09:48 write.cpp
$ cat write.cpp
#include <stdio.h>
int main ()
{
char buffer[] = { 'w' , 't' , 'f' , '\n' };
fwrite(buffer , 1 , sizeof(buffer) , stdout );
}
$ gcc write.cpp -o write
$ ./write
wtf
$
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question