Re: Write a file from binary data

From: Cyrus Welch (cywelch_at_hotmail.com)
Date: 01/24/05


Date: Mon, 24 Jan 2005 02:00:34 GMT

Paul wrote:
> I have the following:
> o = create("microsoft.xmldom")
> o.load("c:\temp\test.xml")
> oImage = o.selectSingleNode("//IMAGE")
>
> oImage.nodeTypedValue now contains a binary image (bitmap) encoded with
> bin.base64. I need to write this to a file but fputs, fwrite & strToFile
> take strings as parameters. Is the only way to do this is to create a
> function in C to write the binary data?
>
>
A variable of type "C" can contain binary data without any problem.



Relevant Pages

  • Write a file from binary data
    ... oImage = o.selectSingleNode ... oImage.nodeTypedValue now contains a binary image (bitmap) encoded with ... function in C to write the binary data? ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Copying string to byte array
    ... >> VB strings cannot contain arbitrary binary data. ... > BSTR OLE automation data type for strings. ... since you are defining right and wrong. ...
    (microsoft.public.vb.general.discussion)
  • Re: working with byte arrays
    ... > I found out that using strings with binary data on PC's with MS ... Public Function LeftBA(ByRef abytValue() As Byte, ...
    (microsoft.public.vb.general.discussion)
  • Re: Copying string to byte array
    ... >> to Unicode using the code page in effect at the time. ... then the conversion cannot be guaranteed transparent. ... Binary data is not even fictional ... VB strings cannot contain arbitrary binary data. ...
    (microsoft.public.vb.general.discussion)
  • Re: VB6, VB2005, or Something Else?
    ... MSBasic has always allowed coercion of numeric types, but adding strings to the coercion mix caused more problems than I care to think about. ... At VB4 MS *redefined* this fundamental data type to use UNICODE under the hood along with zillions of calls to WideToNarrow...and friends at the boundaries. ... They documented that this could corrupt binary data. ...
    (microsoft.public.vb.general.discussion)