BYTE[] to BSTR 
Author Message
 BYTE[] to BSTR

Hi,
I have a problem of string conversion.

I have a string contained in an array of BYTE and I need to return as BSTR*
from a method.

Any help ?

Thanks
Pierre
--
-----------------------------------------------------------
Pierre Greborio
http://www.*-*-*.com/
-----------------------------------------------------------



Sat, 23 Jul 2005 21:57:36 GMT  
 BYTE[] to BSTR
If you're using managed code, look at
System.Text.UnicodeEncoding.Unicode.GetString.


Quote:
> Hi,
> I have a problem of string conversion.

> I have a string contained in an array of BYTE and I need to return as
BSTR*
> from a method.

> Any help ?

> Thanks
> Pierre
> --
> -----------------------------------------------------------
> Pierre Greborio
> http://www.ugidotnet.org
> -----------------------------------------------------------



Sat, 23 Jul 2005 22:22:30 GMT  
 BYTE[] to BSTR
Sorry for the incomplete question, it is unmanaged.

Thanks
Pierre

--
-----------------------------------------------------------
Pierre Greborio
http://www.ugidotnet.org
-----------------------------------------------------------


Quote:
> If you're using managed code, look at
> System.Text.UnicodeEncoding.Unicode.GetString.



> > Hi,
> > I have a problem of string conversion.

> > I have a string contained in an array of BYTE and I need to return as
> BSTR*
> > from a method.

> > Any help ?

> > Thanks
> > Pierre
> > --
> > -----------------------------------------------------------
> > Pierre Greborio
> > http://www.ugidotnet.org
> > -----------------------------------------------------------



Sat, 23 Jul 2005 22:24:06 GMT  
 BYTE[] to BSTR
I got it. The macro A2BSTR solves the problem.

Thanks
Pierre

--
-----------------------------------------------------------
Pierre Greborio
http://www.ugidotnet.org
-----------------------------------------------------------

Quote:
> Sorry for the incomplete question, it is unmanaged.

> Thanks
> Pierre

> --
> -----------------------------------------------------------
> Pierre Greborio
> http://www.ugidotnet.org
> -----------------------------------------------------------


> > If you're using managed code, look at
> > System.Text.UnicodeEncoding.Unicode.GetString.



> > > Hi,
> > > I have a problem of string conversion.

> > > I have a string contained in an array of BYTE and I need to return as
> > BSTR*
> > > from a method.

> > > Any help ?

> > > Thanks
> > > Pierre
> > > --
> > > -----------------------------------------------------------
> > > Pierre Greborio
> > > http://www.ugidotnet.org
> > > -----------------------------------------------------------



Sun, 24 Jul 2005 01:07:46 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Q: Converting char[] with null bytes to BSTR ?

2. BYTE* to BSTR conversion

3. How to tell length of bytes in BSTR in VB Script

4. Convert BYTE to BSTR?

5. how to convert a BSTR to BYTE *?

6. BSTR, BYTE[ ] conversion question

7. Byte stream got messed up in BSTR, CANNOT use SafeArray

8. Byte Streams got messed up when passed thru BSTR

9. BSTR to BYTE

10. Byte stream got messed up in BSTR, CANNOT use SafeArray

11. Byte Streams got messed up when passed thru BSTR

12. converting BYTE buffer to BSTR

 

 
Powered by phpBB® Forum Software