Click here to Skip to main content
16,013,322 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: fstream issues Pin
Alan Chambers29-May-02 11:21
Alan Chambers29-May-02 11:21 
GeneralProblem converting a CComBSTR to LPCTSTR with CW2CT Pin
JC Gauthier29-May-02 10:24
JC Gauthier29-May-02 10:24 
GeneralRe: Problem converting a CComBSTR to LPCTSTR with CW2CT Pin
soptest29-May-02 12:25
soptest29-May-02 12:25 
GeneralRe: Problem converting a CComBSTR to LPCTSTR with CW2CT Pin
JC Gauthier30-May-02 4:27
JC Gauthier30-May-02 4:27 
GeneralRe: Problem converting a CComBSTR to LPCTSTR with CW2CT Pin
soptest30-May-02 8:36
soptest30-May-02 8:36 
General_popen issue Pin
Stew29-May-02 9:41
Stew29-May-02 9:41 
GeneralRe: _popen issue Pin
Joaquín M López Muñoz29-May-02 9:46
Joaquín M López Muñoz29-May-02 9:46 
GeneralRe: _popen issue Pin
soptest29-May-02 9:56
soptest29-May-02 9:56 
you must pass "dir" command to szCommand not a path
* 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 ) );
}


soptest
GeneralWeird Keyboard Hooking Issue Pin
John Aldrich29-May-02 9:02
John Aldrich29-May-02 9:02 
GeneralRe: Weird Keyboard Hooking Issue Pin
Joaquín M López Muñoz29-May-02 9:34
Joaquín M López Muñoz29-May-02 9:34 
GeneralI think I got it now Pin
Joaquín M López Muñoz29-May-02 9:40
Joaquín M López Muñoz29-May-02 9:40 
GeneralMeasureItem doesn't get called. Pin
29-May-02 9:07
suss29-May-02 9:07 
GeneralRe: MeasureItem doesn't get called. Pin
Paul M Watt29-May-02 9:22
mentorPaul M Watt29-May-02 9:22 
GeneralRe: MeasureItem doesn't get called. Pin
29-May-02 9:46
suss29-May-02 9:46 
GeneralQuestion Pin
Steve L.29-May-02 9:04
Steve L.29-May-02 9:04 
GeneralRe: Question Pin
Mauricio Ritter29-May-02 9:20
Mauricio Ritter29-May-02 9:20 
GeneralMaximum value of unsigned long Pin
Hoang Le29-May-02 8:54
Hoang Le29-May-02 8:54 
GeneralRe: Maximum value of unsigned long Pin
Joaquín M López Muñoz29-May-02 8:50
Joaquín M López Muñoz29-May-02 8:50 
GeneralRe: Maximum value of unsigned long Pin
Christopher Lord29-May-02 12:49
Christopher Lord29-May-02 12:49 
GeneralRe: Maximum value of unsigned long Pin
Michael Dunn29-May-02 17:52
sitebuilderMichael Dunn29-May-02 17:52 
GeneralRe: Maximum value of unsigned long Pin
Joaquín M López Muñoz29-May-02 19:59
Joaquín M López Muñoz29-May-02 19:59 
GeneralRe: Maximum value of unsigned long Pin
Michael Dunn29-May-02 20:24
sitebuilderMichael Dunn29-May-02 20:24 
GeneralRe: Maximum value of unsigned long Pin
Joaquín M López Muñoz29-May-02 21:52
Joaquín M López Muñoz29-May-02 21:52 
GeneralRe: Maximum value of unsigned long Pin
Mike Nordell1-Jun-02 0:54
Mike Nordell1-Jun-02 0:54 
GeneralRe: Maximum value of unsigned long Pin
Michael Dunn1-Jun-02 6:22
sitebuilderMichael Dunn1-Jun-02 6:22 

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.