{"url":"https://kagasu.hatenablog.com/entry/2022/12/09/173354","blog_url":"https://kagasu.hatenablog.com/","categories":[".NET","C/C++"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkagasu.hatenablog.com%2Fentry%2F2022%2F12%2F09%2F173354\" title=\"C++(EXE)\u304b\u3089C#(DLL)\u306e\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u65b9\u6cd5\uff08.NET 7 AOT\u5229\u7528\uff09 - \u5099\u5fd8\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"\u5099\u5fd8\u9332","author_name":"kagasu","type":"rich","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/kagasu/","height":"190","version":"1.0","width":"100%","image_url":null,"provider_url":"https://hatena.blog","title":"C++(EXE)\u304b\u3089C#(DLL)\u306e\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u65b9\u6cd5\uff08.NET 7 AOT\u5229\u7528\uff09","published":"2022-12-09 17:33:54","description":"\u2160. \u306f\u3058\u3081\u306b \u30bf\u30a4\u30c8\u30eb\u306e\u901a\u308a\u300cC++(EXE)\u304b\u3089C#(DLL)\u306e\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u65b9\u6cd5\uff08.NET 7 AOT\u5229\u7528\uff09\u300d\u3067\u3059\u3002 \u2161. \u624b\u9806 1. C#(DLL)\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304f Program.cs using System.Runtime.InteropServices; namespace MyDLL { public class MyCalss { [UnmanagedCallersOnly(EntryPoint = \"Sum\")] public static int Sum(int a, int b) { return a + b; } } } 2. C#(DLL)\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u2026"}