RE: converting BSTR (with embedded NULL) to CString.
From: yao (yao_at_discussions.microsoft.com)
Date: 08/19/04
- Next message: Rich: "Re: Tree control"
- Previous message: yao: "Re: MSComm receiving problem"
- In reply to: kwok: "converting BSTR (with embedded NULL) to CString."
- Next in thread: Ajay Kalra: "Re: converting BSTR (with embedded NULL) to CString."
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Aug 2004 15:25:03 -0700
I think you should call SetNullDiscard(false) first, then read data one by
one by bstrVal[i], it might work
"kwok" wrote:
> Hi all,
> I am working on a project that requires reading data from the serial
> port and saving the data. I and using the MSComm control to read in the data
> to a VARIANT. My problem is converting the VARIANT to a string so I could
> write it to a file. The data coming in have embedded NULL in it. So how can I
> save the data to a file and be able to read it at a later time and converted
> back to a VARIANT to send it out to a serial port?
>
> any help is appriciated..
>
> thanks in advance,
>
> Kwok
- Next message: Rich: "Re: Tree control"
- Previous message: yao: "Re: MSComm receiving problem"
- In reply to: kwok: "converting BSTR (with embedded NULL) to CString."
- Next in thread: Ajay Kalra: "Re: converting BSTR (with embedded NULL) to CString."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|