08/04/05 18:25:29
>>578
どこでそんなこと書いてありますか?
//test.cpp
extern "C" int __stdcall f()
{
return 777;
}
//test.def
LIBRARY
EXPORTS
f
//test.cs
using System;
using System.Runtime.InteropServices;
namespace Test
{
class Test
{
[DllImport("test.dll")]
static extern int f();
static void Main()
{
Console.WriteLine(f());
}
}
今のコードはこうです。
DLL側とC#側のコード貼ってください。