<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Takachan</author_name>
  <author_url>https://blog.hatena.ne.jp/Takachan/</author_url>
  <blog_title>PG日誌</blog_title>
  <blog_url>https://takap-tech.com/</blog_url>
  <categories>
    <anon>C#</anon>
    <anon>C++</anon>
  </categories>
  <description>前回記事で、戻り値の構造体にNon-Blittable型(非Blittable型)が含まれる場合例外が発生する件でchar型の固定長配列は自分でマーシャルしないと例外が出るという話の続きです。前回と同じ条件(戻り値が非ポインタ型の構造体)でwchar_t型の固定長配列が含まれる場合も例外は発生してしまうため解決を図ります。 C++側のコード C++側は戻り値が構造体で、wchar_t型の固定長配列が含まれています。 // 構造体 struct CPP_STRUCT { wchar_t path[120]; char name[120]; int id; }; // 関数宣言 extern &quot;C…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakap-tech.com%2Fentry%2F2017%2F08%2F18%2F224724&quot; title=&quot;C#/C++相互運用時の戻り値構造体にwchar_t[]が含まれると例外が出る問題 - PG日誌&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>https://cdn-ak.f.st-hatena.com/images/fotolife/T/Takachan/20170112/20170112223259.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-08-18 22:47:24</published>
  <title>C#/C++相互運用時の戻り値構造体にwchar_t[]が含まれると例外が出る問題</title>
  <type>rich</type>
  <url>https://takap-tech.com/entry/2017/08/18/224724</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
