{"description":"C#\u3068C++\u3067\u66f8\u3044\u305fDLL\u3092\u9023\u643a\u3059\u308b\u3068\u304d\u306e\u30e1\u30e2 DLL\u5074\u306e\u95a2\u6570 DLL_API void setDataToBuffer(void *vp) { *((int *)vp) = 5;} C#\u5074\u306e\u51e6\u7406 // \u5ba3\u8a00 [DllImport(\"DLL\u306e\u540d\u524d\")] static extern void setDataToBuffer(IntPtr p); // \u30dc\u30bf\u30f3\u3067\u30c6\u30b9\u30c8\u3057\u305f\u306e\u3067\u305d\u306e\u51e6\u7406 private void button6_Click(object sender, EventArgs e) { // \u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u9818\u57df\u3092\u78ba\u4fdd\u3059\u308b IntPtr buf = Marshal.AllocCoTask\u2026","type":"rich","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/sato_c/","url":"https://sunnyday.hatenablog.jp/entry/2014/12/22/131844","categories":[],"title":"void *\u3067\u30dd\u30a4\u30f3\u30bf\u3092\u6e21\u3057\u3066\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u5f97\u308b\u5834\u5408","provider_url":"https://hatena.blog","width":"100%","blog_title":"\u3080\u305a\u304b\u3057\u3044\u3053\u3068\u306f\u308f\u304b\u308a\u307e\u305b\u3093","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsunnyday.hatenablog.jp%2Fentry%2F2014%2F12%2F22%2F131844\" title=\"void *\u3067\u30dd\u30a4\u30f3\u30bf\u3092\u6e21\u3057\u3066\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u5f97\u308b\u5834\u5408 - \u3080\u305a\u304b\u3057\u3044\u3053\u3068\u306f\u308f\u304b\u308a\u307e\u305b\u3093\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","version":"1.0","blog_url":"https://sunnyday.hatenablog.jp/","author_name":"sato_c","published":"2014-12-22 13:18:44"}