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. .NET (Core and Framework)
  4. how to import a dll in Windows Service

how to import a dll in Windows Service

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpvisual-studiodebuggingbeta-testinghelp
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.
  • R Offline
    R Offline
    ramyasangeet
    wrote on last edited by
    #1

    Hi all, I have created a Windows Service in visual Studio 2005 beta version.In this service,I want to import a dll called CamtoJ2k.dll. [DllImport("CamToJ2K.DLL", CharSet = CharSet.Unicode)] static extern bool CamToJ2K(string sourcePath, string destinationPath, int qFactor); I also copied this dll in bin\debug folder. When i ran the service ,i got an error that unable find the dll. **Exception:System.DllNotFoundException: Unable to load DLL 'CamToJ2K.DLL': The specified module could not be found. (Exception from HRESULT: 0x8007007E)**Plz tell me about 1.how to import dll in service 2.do i need to add any reference to this dll(i tried this but couldnt able to add ) Thanks in Advance.. cheers sangeet

    cheers sangeet

    P 1 Reply Last reply
    0
    • R ramyasangeet

      Hi all, I have created a Windows Service in visual Studio 2005 beta version.In this service,I want to import a dll called CamtoJ2k.dll. [DllImport("CamToJ2K.DLL", CharSet = CharSet.Unicode)] static extern bool CamToJ2K(string sourcePath, string destinationPath, int qFactor); I also copied this dll in bin\debug folder. When i ran the service ,i got an error that unable find the dll. **Exception:System.DllNotFoundException: Unable to load DLL 'CamToJ2K.DLL': The specified module could not be found. (Exception from HRESULT: 0x8007007E)**Plz tell me about 1.how to import dll in service 2.do i need to add any reference to this dll(i tried this but couldnt able to add ) Thanks in Advance.. cheers sangeet

      cheers sangeet

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

      Are you sure your service is being run from the bin\debug folder? Also, does your CamToJ2K.dll have any dependencies that might also need to be copied to that location? -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