Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. How to import a native dll in Pocket PC.

How to import a native dll in Pocket PC.

Scheduled Pinned Locked Moved Mobile
csharpc++debuggingtutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    phijophlip
    wrote on last edited by
    #1

    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 :)

    U 1 Reply Last reply
    0
    • P phijophlip

      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 :)

      U Offline
      U Offline
      umseker
      wrote on last edited by
      #2

      Your syntax is correct be sure your dll compiled for correct CPU (for ex. arm )

      UMS

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups