P
Programmer
Major problems w/ deadline tonight!
I've created a DLL with the SmartPhone SDK. I've created a .NET CF app and try to p/invoke a function in the DLL. I always get System.MissingMethodException.
I've copied the DLL to both my application's folder and in the \windows folder on the PocketPC.
Here's my DLL code (actually, this is all auto-generated by the SDK)
#ifdef MYSTUFF_EXPORTS
#define MYSTUFF_API __declspec(dllexport)
#else
#define MYSTUFF_API __declspec(dllimport)
#endif
// This is an example of an exported function.
MYSTUFF_API int fnMyStuff(void)
{
return 42;
}
Here's the .NET code:
[System.Runtime.InteropServices.DllImport("MyStuff.dll")]
public static extern int fnMyStuff();
private void DLLButton_Click(object sender, System.EventArgs e)
{
int DLLReturned = fnMyStuff();
MessageBox.Show(DLLReturned.ToString());
}
The fnMyStuff() line is what triggers the exception.
Any help is greatly appreciated.. and the sooner the better!
I've created a DLL with the SmartPhone SDK. I've created a .NET CF app and try to p/invoke a function in the DLL. I always get System.MissingMethodException.
I've copied the DLL to both my application's folder and in the \windows folder on the PocketPC.
Here's my DLL code (actually, this is all auto-generated by the SDK)
#ifdef MYSTUFF_EXPORTS
#define MYSTUFF_API __declspec(dllexport)
#else
#define MYSTUFF_API __declspec(dllimport)
#endif
// This is an example of an exported function.
MYSTUFF_API int fnMyStuff(void)
{
return 42;
}
Here's the .NET code:
[System.Runtime.InteropServices.DllImport("MyStuff.dll")]
public static extern int fnMyStuff();
private void DLLButton_Click(object sender, System.EventArgs e)
{
int DLLReturned = fnMyStuff();
MessageBox.Show(DLLReturned.ToString());
}
The fnMyStuff() line is what triggers the exception.
Any help is greatly appreciated.. and the sooner the better!