Bill Roper (billroper) wrote,
Bill Roper
billroper

What We Have Here Is a Failure of Documentation

Back from Marcon and back to work.

So before I left, I was having a deep and abiding problem getting Microsoft's Open XML toolkit to work with a MemoryStream, because the MemoryStream couldn't be resized, nor could I find a way to get the resulting changes to the document written out to a disk file. This was after reading every bit of documentation I could find.

Today, it seems that my Google-fu turned back on, because I found the sample code that:

  • Explained how you could get a resizeable MemoryStream by creating an empty one and then copying the byte array of data into it.
  • Showed how you could call MemoryStream.WriteTo to send the resulting document to a FileStream.

    *thud* *thud* *thud*

    This should not have been this hard to find.
  • Tags: microsoft, musings, work
    Subscribe

    • Time for Rebuilding

      Well, there's nothing like research. Having determined that DDR5 is going to carry a substantial price premium over DDR4 memory for at least a year…

    • Driven Wild

      The studio computer continues to misbehave in various ways. When I fired up Cubase today, I got a lot of nasty, blocky video, despite having cleaned…

    • Some Old Doggerel

      I recall having mangled a CSN tune many years ago on the way to Contraption. Like that convention, the particular co-worker whose code I was digging…

    • Post a new comment

      Error

      Anonymous comments are disabled in this journal

      default userpic

      Your reply will be screened

      Your IP address will be recorded 

    • 1 comment