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. DllNotFoundException

DllNotFoundException

Scheduled Pinned Locked Moved C#
csharpc++debugginghelpquestion
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.
  • L Offline
    L Offline
    Larsenal
    wrote on last edited by
    #1

    I am porting a C# app from .Net 1.1 to 2.0. The app uses a native DLL. In 1.1, I used the following code successfully: [DllImport(@"cbWaypoint.dll", EntryPoint="NEWJOB")] public static extern void NEWJOB(); The DLL was located in the same folder as the assembly (bin/Debug). However, when I try to do the same thing using 2.0, I get a DllNotFoundException: Unable to load DLL 'cbWaypoint.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) Is anyone aware of changes to PInvoke in 2.0 that would cause this problem?

    P 1 Reply Last reply
    0
    • L Larsenal

      I am porting a C# app from .Net 1.1 to 2.0. The app uses a native DLL. In 1.1, I used the following code successfully: [DllImport(@"cbWaypoint.dll", EntryPoint="NEWJOB")] public static extern void NEWJOB(); The DLL was located in the same folder as the assembly (bin/Debug). However, when I try to do the same thing using 2.0, I get a DllNotFoundException: Unable to load DLL 'cbWaypoint.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) Is anyone aware of changes to PInvoke in 2.0 that would cause this problem?

      P Offline
      P Offline
      Phillip M Hoff
      wrote on last edited by
      #2

      Does your native DLL have any dependencies that may be missing (i.e. must also be in the same folder or registered elsewhere on the machine)? -Phil

      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