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. Windows Service And Custom DLL

Windows Service And Custom DLL

Scheduled Pinned Locked Moved C#
csharphelp
3 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.
  • C Offline
    C Offline
    cacadekick
    wrote on last edited by
    #1

    Has anyone written a Windows Service that calls a custom DLL. I wrote the service in C# that responds to a timer every 30 minutes (this worked without any problems). Once I try and call my C# DLL which I striped down to the simplest form (it just writes an entry into the event log) it hangs and will not process. I have searched the web and MSDN and have found no answers. Any help would be greatly appreciated. Mike. :((

    B 1 Reply Last reply
    0
    • C cacadekick

      Has anyone written a Windows Service that calls a custom DLL. I wrote the service in C# that responds to a timer every 30 minutes (this worked without any problems). Once I try and call my C# DLL which I striped down to the simplest form (it just writes an entry into the event log) it hangs and will not process. I have searched the web and MSDN and have found no answers. Any help would be greatly appreciated. Mike. :((

      B Offline
      B Offline
      Burt Harris
      wrote on last edited by
      #2

      What I'd do is attach to the service with a debugger and trace thru it. I gather your C# service is an EXE, and it's connecting to a different C# DLL. Is the EXE built with a reference to the DLL, or are you trying to do something different? Do they exist in the same directory? One possibility is there is some problem locating the DLL. There's a tool called FUSLOGVW that helps in tracking this sort of thing. Another thing to check is what account the service is running under. Some accounts, like the XP local and network service accounts have enough privilidge to write to an existing event log source, but not enough to create a new source. Creating of the new source typically happens at installation time. Hope some of that helps you. Burt Harris

      C 1 Reply Last reply
      0
      • B Burt Harris

        What I'd do is attach to the service with a debugger and trace thru it. I gather your C# service is an EXE, and it's connecting to a different C# DLL. Is the EXE built with a reference to the DLL, or are you trying to do something different? Do they exist in the same directory? One possibility is there is some problem locating the DLL. There's a tool called FUSLOGVW that helps in tracking this sort of thing. Another thing to check is what account the service is running under. Some accounts, like the XP local and network service accounts have enough privilidge to write to an existing event log source, but not enough to create a new source. Creating of the new source typically happens at installation time. Hope some of that helps you. Burt Harris

        C Offline
        C Offline
        cacadekick
        wrote on last edited by
        #3

        Burt, Thanks. I finally got it to work over the weekend. It had to do with the account the service was running under. Acts a lot differently from XP to NT.

        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