{"action":"opened","issue":{"url":"https://api.github.com/repos/0xd4d/dnlib/issues/172","repository_url":"https://api.github.com/repos/0xd4d/dnlib","labels_url":"https://api.github.com/repos/0xd4d/dnlib/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/0xd4d/dnlib/issues/172/comments","events_url":"https://api.github.com/repos/0xd4d/dnlib/issues/172/events","html_url":"https://github.com/0xd4d/dnlib/issues/172","id":310110037,"number":172,"title":"How to export managed method?","user":{"login":"CreateAndInject","id":2529999,"avatar_url":"https://avatars1.githubusercontent.com/u/2529999?v=4","gravatar_id":"","url":"https://api.github.com/users/CreateAndInject","html_url":"https://github.com/CreateAndInject","followers_url":"https://api.github.com/users/CreateAndInject/followers","following_url":"https://api.github.com/users/CreateAndInject/following{/other_user}","gists_url":"https://api.github.com/users/CreateAndInject/gists{/gist_id}","starred_url":"https://api.github.com/users/CreateAndInject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CreateAndInject/subscriptions","organizations_url":"https://api.github.com/users/CreateAndInject/orgs","repos_url":"https://api.github.com/users/CreateAndInject/repos","events_url":"https://api.github.com/users/CreateAndInject/events{/privacy}","received_events_url":"https://api.github.com/users/CreateAndInject/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-30T16:34:39Z","updated_at":"2018-03-30T16:34:39Z","closed_at":null,"author_association":"NONE","body":"```\r\n        public static void Test()\r\n        {\r\n            var module= ModuleDefMD.Load(@\"C:\\cl.dll\");\r\n            var method = module.Types[1].Methods[0];\r\n            method.ExportInfo = new MethodExportInfo();\r\n            module.Write(\"cl.dll\");\r\n            var handle = LoadLibrary(\"cl.dll\");//**handle=0**\r\n            var value = Get();//**BadImageFormatException**\r\n        }\r\n        [DllImport(\"cl.dll\")]\r\n        public static extern int Get();\r\n        [DllImport(\"kernel32\")]\r\n        public static extern int LoadLibrary(string name);\r\n```"}}
{"actor":{"display_login":"CreateAndInject"}}