Click here to Skip to main content
16,007,885 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalserver socket problem, simple... Pin
includeh1028-Jun-02 17:44
includeh1028-Jun-02 17:44 
GeneralRe: server socket problem, simple... Pin
Christopher Lord28-Jun-02 20:40
Christopher Lord28-Jun-02 20:40 
GeneralRe: server socket problem, simple... Pin
includeh1029-Jun-02 16:02
includeh1029-Jun-02 16:02 
GeneralRe: server socket problem, simple... Pin
markkuk29-Jun-02 23:21
markkuk29-Jun-02 23:21 
Generalsynchronize remote recordset with local one Pin
28-Jun-02 17:42
suss28-Jun-02 17:42 
Questionhow to get info from stdio? Pin
includeh1028-Jun-02 17:36
includeh1028-Jun-02 17:36 
AnswerRe: how to get info from stdio? Pin
Michael Dunn28-Jun-02 20:20
sitebuilderMichael Dunn28-Jun-02 20:20 
GeneralRe: how to get info from stdio? Pin
Mike Nordell30-Jun-02 0:20
Mike Nordell30-Jun-02 0:20 
If that's too "heavy", and onlystdout is needed, a plain call to _popen will do. Example

/* POPEN.C: This program uses _popen and _pclose to receive a 
 * stream of text from a system process.
 */

#include <stdio.h>
#include <stdlib.h>

void main( void )
{

   char   psBuffer[128];
   FILE   *chkdsk;

        /* Run DIR so that it writes its output to a pipe. Open this
    * pipe with read text attribute so that we can read it 
         * like a text file. 
    */
   if( (chkdsk = _popen( "dir *.c /on /p", "rt" )) == NULL )
      exit( 1 );

   /* Read pipe until end of file. End of file indicates that 
    * CHKDSK closed its standard out (probably meaning it 
         * terminated).
    */
   while( !feof( chkdsk ) )
   {
      if( fgets( psBuffer, 128, chkdsk ) != NULL )
         printf( psBuffer );
   }

   /* Close pipe and print return value of CHKDSK. */
   printf( "\nProcess returned %d\n", _pclose( chkdsk ) );
}

GeneralRe: how to get info from stdio? Pin
includeh1030-Jun-02 21:06
includeh1030-Jun-02 21:06 
Generalfriend function problem ... Pin
Hadi Rezaee28-Jun-02 16:33
Hadi Rezaee28-Jun-02 16:33 
GeneralRe: friend function problem ... Pin
moswal28-Jun-02 17:46
moswal28-Jun-02 17:46 
GeneralMemory Context Memory Leak Pin
moswal28-Jun-02 16:08
moswal28-Jun-02 16:08 
GeneralCircular Queue Pin
JohnnyG28-Jun-02 14:55
JohnnyG28-Jun-02 14:55 
GeneralRe: Circular Queue Pin
Ancient Dragon28-Jun-02 15:28
Ancient Dragon28-Jun-02 15:28 
GeneralRe: Circular Queue Pin
subtractive30-Jun-02 7:28
subtractive30-Jun-02 7:28 
GeneralRe: Circular Queue Pin
JohnnyG30-Jun-02 12:53
JohnnyG30-Jun-02 12:53 
GeneralOpaque Label Controls Pin
AndyO28-Jun-02 14:45
AndyO28-Jun-02 14:45 
GeneralWinCE Help Files Pin
Mel Stober28-Jun-02 12:27
Mel Stober28-Jun-02 12:27 
GeneralRe: WinCE Help Files Pin
Anders Molin29-Jun-02 3:03
professionalAnders Molin29-Jun-02 3:03 
GeneralMulti language Pin
orcun colak28-Jun-02 11:51
orcun colak28-Jun-02 11:51 
GeneralRe: Multi language Pin
Scott H. Settlemier29-Jun-02 6:20
Scott H. Settlemier29-Jun-02 6:20 
GeneralMessageBox problem - only flashes Pin
David Viggiano28-Jun-02 10:38
David Viggiano28-Jun-02 10:38 
GeneralRe: MessageBox problem - only flashes Pin
Jason Henderson28-Jun-02 16:24
Jason Henderson28-Jun-02 16:24 
GeneralHelp me>>>>>>>>>>>>>>>> Pin
Michael Liu28-Jun-02 8:36
Michael Liu28-Jun-02 8:36 
GeneralRe: Help me>>>>>>>>>>>>>>>> Pin
Mike Nordell28-Jun-02 8:46
Mike Nordell28-Jun-02 8:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.