to CString question - Programmer

This is a discussion on to CString question - Programmer ; How to convert Buf to CString?. Read ( unsigned char * Buf , unsigned long * BufSize ); -- Sent by nysfp from hotmail part of com This is a spam protected message. Please answer with reference header. Posted via ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: to CString question

  1. to CString question

    How to convert Buf to CString?.

    Read ( unsigned char * Buf ,
    unsigned long * BufSize );




    --
    Sent by nysfp from hotmail part of com
    This is a spam protected message. Please answer with reference header.
    Posted via http://www.usenet-replayer.com/cgi/content/new

  2. Re: to CString question

    nysfp@hotmail.com wrote:

    > How to convert Buf to CString?.
    >
    > Read ( unsigned char * Buf ,
    > unsigned long * BufSize );
    >


    GetBuffer(BufSize)

    --
    Scott McPhillips [VC++ MVP]


  3. Re: to CString question


    "nysfp@hotmail.com" wrote in
    message news:l.1065065369.1744873046@[63.127.215.130]...
    > How to convert Buf to CString?.
    >
    > Read ( unsigned char * Buf ,
    > unsigned long * BufSize );


    CString s;
    Buf[BuffSize] = 0;
    s = Buf;

    Cheers
    Richard.



  4. Re: to CString question

    CString has a constructor that will initialize from unsigned char *.

    In article , nysfp@hotmail.com
    says...
    > How to convert Buf to CString?.
    >
    > Read ( unsigned char * Buf ,
    > unsigned long * BufSize );


  5. Re: to CString question

    Careful. . . . BufSize is a pointer to a ULONG that probably represents
    the size of the buffer. Pointers may be NULL, and most likely you meant
    if ( ( Buf != NULL )
    && ( BufSize != NULL )
    )
    {
    Buf[*BufSize-1] = '\0';
    CString s( Buf );
    }

    In article , rf
    says...
    >
    > "nysfp@hotmail.com" wrote in
    > message news:l.1065065369.1744873046@[63.127.215.130]...
    > > How to convert Buf to CString?.
    > >
    > > Read ( unsigned char * Buf ,
    > > unsigned long * BufSize );

    >
    > CString s;
    > Buf[BuffSize] = 0;
    > s = Buf;
    >
    > Cheers
    > Richard.
    >
    >
    >


+ Reply to Thread