B
Brian Scott
Hi,
Can someone help me out. I am trying to write a dynamic link library in
embedded visual C++ that will be called using DLLImport in CF.
The problem is that after succesfully building the dll I keep getting
System.MissingMethodException on the CF program. I build the library using
AMRV4 for the handheld and x86 for PPC2002 emulator.
I have checked the dependencies and maming with Depends.exe and also Dumpbin
and everything seems fine. I've tried EntryPoint as function and also
ordinal value but with the same error.
I am using Embedded Visual C++ 4.0 with both service packs as well as having
installed PPC2002 SDK on my machine.
I do however get the following message after each build as well as only
being able to target STANDARDSDK. Is there some configuration problem I have
missed?
"An appliaction targetting a Standard SDK for Windows CE .NET and built for
the X86 CPU cannot be run on the emulator device. In oder to run this
application on any CPU other thatn the Emulator, you will have to install an
SDK that is compatible with the Standard SDK for Windows CE.NET, then target
a shadow platform pertaining to that SDK."
Finally, I have tried sing extern "C" as well as a DEF file for exporting
the function names unmangled.
/****************************************
EVC++ Code;
#include "stdafx.h"
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
extern "C" _declspec(dllexport) int WINAPI Myadd(int a, int b)
{
return a+b;
}
extern "C" _declspec(dllexport) int WINAPI Mymulti(int a, int b)
{
return a*b;
}
/****************************************
C# CF code
[DllImport ("TestDll.dll")]
public static extern int Myadd(int i1, int i2);
[DllImport ("TestDll.dll")]
public static extern int Mymulti(int i1, int i2);
/****************************************
Can someone help me out. I am trying to write a dynamic link library in
embedded visual C++ that will be called using DLLImport in CF.
The problem is that after succesfully building the dll I keep getting
System.MissingMethodException on the CF program. I build the library using
AMRV4 for the handheld and x86 for PPC2002 emulator.
I have checked the dependencies and maming with Depends.exe and also Dumpbin
and everything seems fine. I've tried EntryPoint as function and also
ordinal value but with the same error.
I am using Embedded Visual C++ 4.0 with both service packs as well as having
installed PPC2002 SDK on my machine.
I do however get the following message after each build as well as only
being able to target STANDARDSDK. Is there some configuration problem I have
missed?
"An appliaction targetting a Standard SDK for Windows CE .NET and built for
the X86 CPU cannot be run on the emulator device. In oder to run this
application on any CPU other thatn the Emulator, you will have to install an
SDK that is compatible with the Standard SDK for Windows CE.NET, then target
a shadow platform pertaining to that SDK."
Finally, I have tried sing extern "C" as well as a DEF file for exporting
the function names unmangled.
/****************************************
EVC++ Code;
#include "stdafx.h"
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
extern "C" _declspec(dllexport) int WINAPI Myadd(int a, int b)
{
return a+b;
}
extern "C" _declspec(dllexport) int WINAPI Mymulti(int a, int b)
{
return a*b;
}
/****************************************
C# CF code
[DllImport ("TestDll.dll")]
public static extern int Myadd(int i1, int i2);
[DllImport ("TestDll.dll")]
public static extern int Mymulti(int i1, int i2);
/****************************************