Results 1 to 14 of 14

Thread: registering a dll as a service

  1. #1

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539

    registering a dll as a service

    Is there a way in my exe program i can register a dll as a service ?

    If so please try and give code samples
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  2. #2
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    Carl,

    The answer to this question can fill a couple of books, and while I hate to answer a question with a question, I need to know, did you build your DLL as a windows service?

    If not, then nothing you can do will help you with that you will have to rebuild your project as a windows service first. That's where the books come in, I've written a couple of windows services, but I wrote them in C# so the code would be of no value here.

  3. #3
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618
    Aren't services executeables, not DLLs?
    Sean

    Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.

  4. #4
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    I stand corrected on the DLL/EXE argument , but the rest of the post still stands, you must create your project as a windows service to register it as one under windows.

  5. #5

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539
    no i havnt started building it as yet i like to make sure all the corners are covers before starting someting hence why i ask now..

    As for the writing of the service yes it will be wrote under windows service but i have another application(exe) that i want to register the service, hence the title of this post
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  6. #6
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618
    You use the InstallUtil to register the service. I don't see why your other app couldn't just call a command line of it through Shell.
    Sean

    Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.

  7. #7

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539
    YEAH command line you can also hide that process cant you ?
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  8. #8
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618
    Hehe, ok, this sounds like we are trying to help you do something sinister....
    Sean

    Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.

  9. #9

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539


    Yeah well its actully for protecting the software on a certain drive... :O)

    thanks for the help
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  10. #10
    PowerPoster JPnyc's Avatar
    Join Date
    Oct 2002
    Location
    Manhattan
    Posts
    3,015
    Hey, I have a similar question. I want to write a GUI-less .exe in VB and have it run as a service, but I don't know what manner of executable to begin with. Is it standard exe, or Active x .exe? Thanks for any assistance.

  11. #11
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    Are you talking about VB6?

    If so, you cannot directly do this in vb, but there is a wrapper out there somewhere that will help you accomplish this. I no longer have the link for the library and I'll warn you ahead of time, it wasn't very stable when I used it, but that was probably 5 years ago..
    Whadayamean it doesn't work....
    It works fine on my machine!

  12. #12
    PowerPoster JPnyc's Avatar
    Join Date
    Oct 2002
    Location
    Manhattan
    Posts
    3,015
    OK thanks, that saves quite a bit of time and effort. I'll create it as a regular executable rather than as a service.

  13. #13

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539
    to create a service in vb.net just select "Windows Service" from the create new project dialog
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  14. #14
    PowerPoster JPnyc's Avatar
    Join Date
    Oct 2002
    Location
    Manhattan
    Posts
    3,015
    Thanks. 1st I'd need to install .net on this station. I'm not sure I'm going to bother for a little DB backup utility. I'll just create an exe and use windows scheduler to run it once a week.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width