How to import a native dll in Pocket PC.
-
Hi Friends, I have created a native dll in C++. How can I import the dll to an CSharp smart device application. ///////////////////////////////////////////////////////////// Sample Code in C# is given below. using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace CallingSquareDllInSharp { class One { [DllImport("SquareDll.dll")] public static extern int squ(int x); static void Main(string[] args) { int a = 10; int result = One.squ(a); Console.WriteLine(result); } } } //////////////////////////////////////////////////////////////////// When I debug the the exe , I am getting an exception DllNotFoundException. The above C# application is Console program run on visual 2005. Kindly reply. Thanks Phijo :)
-
Hi Friends, I have created a native dll in C++. How can I import the dll to an CSharp smart device application. ///////////////////////////////////////////////////////////// Sample Code in C# is given below. using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace CallingSquareDllInSharp { class One { [DllImport("SquareDll.dll")] public static extern int squ(int x); static void Main(string[] args) { int a = 10; int result = One.squ(a); Console.WriteLine(result); } } } //////////////////////////////////////////////////////////////////// When I debug the the exe , I am getting an exception DllNotFoundException. The above C# application is Console program run on visual 2005. Kindly reply. Thanks Phijo :)