Home > Software engineering >  Use printf or not after vs2015 redirect the output to the pipeline, with vs2013 can output
Use printf or not after vs2015 redirect the output to the pipeline, with vs2013 can output

Time:11-15

ReadFile no data has been read, I can just read data, compiled using vs2013 vs2015 maturing, don't know why, please teach a great god!

SECURITY_ATTRIBUTES sa;
Sa. NLength=sizeof (SECURITY_ATTRIBUTES);
Sa. The lpSecurityDescriptor=NULL;
Sa. BInheritHandle=TRUE;
if (! The CreatePipe (& amp; G_stdoutPipR, & amp; G_stdoutPipW, & amp; Sa, 0))
{
Printf (" stdout pipe creation failed \ n ");
return;
}
* stdout=* _fdopen (_open_osfhandle ((long) g_stdoutPipW, _O_TEXT), "w");
Setvbuf (_IONBF stdout, NULL, 0);

CodePudding user response:

Set a breakpoint at every step of success?
_open_osfhandle prototype
 int _open_osfhandle (intptr_t osfhandle, int flags) 

Suggest using the
 _open_osfhandle ((intptr_t) XXX 
, long under a 64 - bit system will be truncated

  • Related