i am trying to access a C written dll from C#...
i am just not sure of my dll code....heres is it....
does this look ok? or do i have to add anything???
#include
__declspec(dllexport) void func(void)
{
printf("inside func!");
}
and the calling C# code:
class PlatformInvokeTest
{
[DllImport("Try.dll",EntryPoint="func")]
public static extern void func();
public static void Main()
{
func();
}
}
when i run, i get an error like:::
Unhandled Exception: System.EntryPointNotFoundException: Unable to find an entry point named func in DLL Try.dll.
i am just not sure of my dll code....heres is it....
does this look ok? or do i have to add anything???
#include
__declspec(dllexport) void func(void)
{
printf("inside func!");
}
and the calling C# code:
class PlatformInvokeTest
{
[DllImport("Try.dll",EntryPoint="func")]
public static extern void func();
public static void Main()
{
func();
}
}
when i run, i get an error like:::
Unhandled Exception: System.EntryPointNotFoundException: Unable to find an entry point named func in DLL Try.dll.