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. General Programming
  3. C#
  4. Problem: How to include DLL when I compiled my windows mobile project?

Problem: How to include DLL when I compiled my windows mobile project?

Scheduled Pinned Locked Moved C#
csharpquestionvisual-studiohelptutorial
6 Posts 3 Posters 1 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.
  • L Offline
    L Offline
    leslie wu
    wrote on last edited by
    #1

    Hello all, I have created a DLL (smart device -> win32 application -> DLL) in Visual Studio 2005 and it can be compiled successfully using the Windows Mobile 6 SDK. I try going to test my DLL by creating a new project (c#->device application -> wm6 application) and add the DLL to it. I tried dragging the DLL into application it works, but it doesnt work when I tried to add reference to it However, whenever I try building the project on simulator, it says it cannot find the DLL. Funny enough, when I directly put the application exe and the dll to my device, it works. But I observe that my DLL library is not performing what it should be. What is the problem with it ? Assistance of any forms will be highly appreciated. Thanks, Leslie

    T 1 Reply Last reply
    0
    • L leslie wu

      Hello all, I have created a DLL (smart device -> win32 application -> DLL) in Visual Studio 2005 and it can be compiled successfully using the Windows Mobile 6 SDK. I try going to test my DLL by creating a new project (c#->device application -> wm6 application) and add the DLL to it. I tried dragging the DLL into application it works, but it doesnt work when I tried to add reference to it However, whenever I try building the project on simulator, it says it cannot find the DLL. Funny enough, when I directly put the application exe and the dll to my device, it works. But I observe that my DLL library is not performing what it should be. What is the problem with it ? Assistance of any forms will be highly appreciated. Thanks, Leslie

      T Offline
      T Offline
      Tony Richards
      wrote on last edited by
      #2

      It sounds like the DLL isn't being copied over to the device when you are testing. What exactly do you mean by

      leslie wu wrote:

      I tried dragging the DLL into application it works, but it doesnt work when I tried to add reference to it

      If there isn't a reference to the DLL in the project, I doubt VS will know to copy it over when testing. Edit : Also, what sort of DLL is it (is it, for example, a .Net Assembly)?

      My Blog: This Blog

      L 1 Reply Last reply
      0
      • T Tony Richards

        It sounds like the DLL isn't being copied over to the device when you are testing. What exactly do you mean by

        leslie wu wrote:

        I tried dragging the DLL into application it works, but it doesnt work when I tried to add reference to it

        If there isn't a reference to the DLL in the project, I doubt VS will know to copy it over when testing. Edit : Also, what sort of DLL is it (is it, for example, a .Net Assembly)?

        My Blog: This Blog

        L Offline
        L Offline
        leslie wu
        wrote on last edited by
        #3

        Hi Tony, Thank you for your reply. What I mean by that is if I drag my compiled DLL from windows explorer directly into the the solution explorer space, I can see the DLL copied into the project. However, if I try adding by clicking: my project -->"add reference" and add my DLL,it says " A reference to mydll could not be added. What is the problem with it ? What should be the proper way in adding my DLL ? And to my second problem concerning my dll function is not working properly, any clue ? Thanks, Leslie

        L 1 Reply Last reply
        0
        • L leslie wu

          Hi Tony, Thank you for your reply. What I mean by that is if I drag my compiled DLL from windows explorer directly into the the solution explorer space, I can see the DLL copied into the project. However, if I try adding by clicking: my project -->"add reference" and add my DLL,it says " A reference to mydll could not be added. What is the problem with it ? What should be the proper way in adding my DLL ? And to my second problem concerning my dll function is not working properly, any clue ? Thanks, Leslie

          L Offline
          L Offline
          leslie wu
          wrote on last edited by
          #4

          To be precise, I got the following error: An unhandled exception of type 'System.MissingMethodException' occurred in DeviceApplication2.exe Additional information: Can't find PInvoke DLL 'smartdevicedll.dll'.

          E 1 Reply Last reply
          0
          • L leslie wu

            To be precise, I got the following error: An unhandled exception of type 'System.MissingMethodException' occurred in DeviceApplication2.exe Additional information: Can't find PInvoke DLL 'smartdevicedll.dll'.

            E Offline
            E Offline
            Ennis Ray Lynch Jr
            wrote on last edited by
            #5

            That is a versioning error, usually.

            Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
            If you don't ask questions the answers won't stand in your way.
            Most of this sig is for Google, not ego.

            L 1 Reply Last reply
            0
            • E Ennis Ray Lynch Jr

              That is a versioning error, usually.

              Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
              If you don't ask questions the answers won't stand in your way.
              Most of this sig is for Google, not ego.

              L Offline
              L Offline
              leslie wu
              wrote on last edited by
              #6

              Got it ...you need to use Window CE Remote File Viewer to look at the path.. Everything sorted..thanks everyone !!!

              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