Problem with PInvoke with compact framework
I am trying to build a CF application that calls unmanaged code. I use PInvoke (I've tried both VB.Net with Declare and <DllImport> and C# with [DllImport]) but everytime I get SystemMissingMethodException.
I am using Visual Studio .Net 2003, Pocket PC 2002 (emulator), and CF 1.0 RTM on the emulator.
The unmanage code is written in C with _cdecl calling convention. I've used DirectoryInfo and confirmed that the dll is in the directory with my CF application. I've also run dumpbin.exe to confirm the function name in the dll.
Are there any problems with this early version of the compact framework (CF 1.0 RTM)? Would they account for this problem? I've download CF 1.0 SP3, but I'm not sure how to load it into the emulator. ActiveSync as a stand alone program does not connect with the emulator.
Here is a snapshot of my PInvoke code for VB.net:
Declare Function Mytst Lib "Mydll.dll" () As Int
<DllImport("Mydll.dll", CharSet:=CharSet.Auto, _
Public Function Mytst() As Int
Dim Myret as int
Myret = Mytst
Neither one works.
Any other thoughts.
By Darrell W in forum .NET
Last Post: 11-07-2005, 12:25 PM
By vikassheelgupta in forum Java
Last Post: 07-22-2005, 05:35 AM
By sups123 in forum Mobile
Last Post: 05-13-2005, 09:57 AM
Last Post: 04-07-2005, 03:08 PM
Last Post: 12-13-2001, 12:06 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL