<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>potisan</author_name>
  <author_url>https://blog.hatena.ne.jp/potisan/</author_url>
  <blog_title>potisanのプログラミングメモ</blog_title>
  <blog_url>https://potisan-programming-memo.hatenablog.jp/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>概要 文字列型の引数を伴うプラットフォーム呼び出し（P/Invoke）を実行するとき、引数の型によりマーシャリング動作が変わります。具体的にはC#側がstring/StringBuilder/byte型、プラットフォーム側（C/C++側）がLPWSTR/LPSTR（UnmanagedType.LPWStr/LPStr）の場合について次表の動作が得られます。LPTSTR（UnmanagedType.LPTStr）の場合はDllImport属性のCharSetで指定された値によりLPWSTRまたはLPSTRが選択されます。 この動作により、文字列型を渡すだけの場合はstring型、呼び出し側で処理…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpotisan-programming-memo.hatenablog.jp%2Fentry%2F2019%2F03%2F23%2F000000&quot; title=&quot;C# P/Invoke時の文字列型マーシャリングの考察 - potisanのプログラミングメモ&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>2019-03-23 00:00:00</published>
  <title>C# P/Invoke時の文字列型マーシャリングの考察</title>
  <type>rich</type>
  <url>https://potisan-programming-memo.hatenablog.jp/entry/2019/03/23/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
