<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sirocco</author_name>
  <author_url>https://blog.hatena.ne.jp/sirocco/</author_url>
  <blog_title>sirocco の書いてもすぐに忘れるメモ</blog_title>
  <blog_url>https://sirocco.hatenadiary.org/</blog_url>
  <categories>
    <anon>MS-Windows</anon>
    <anon>Haskell</anon>
    <anon>COM</anon>
    <anon>文字コード</anon>
  </categories>
  <description>Haskell から COM を呼ぶ ために MultiByteToWideCharを使わないでSysAllocStringで行うためのテストです。 SysAllocString で BSTR を作りますが、SysAllocStringはバイナリの文字列長を含まないワイド文字列の先頭アドレスを返します。読み取るときはCWStringと同等に扱っても問題ありません。 4byte 可変長 2byte ┌───┬──────────┬─┐ │length│ string │\0│ └───┴──────────┴─┘ ↑ SysAllocString はここのアドレスを返します。 参考 BSTR 覚…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsirocco.hatenadiary.org%2Fentry%2F20121106%2F1352231812&quot; title=&quot;COM を学ぶ(10) :  SysAllocString を使って BSTR を作る。 - sirocco の書いてもすぐに忘れるメモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-11-06 04:56:52</published>
  <title>COM を学ぶ(10) :  SysAllocString を使って BSTR を作る。</title>
  <type>rich</type>
  <url>https://sirocco.hatenadiary.org/entry/20121106/1352231812</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
