Results 1 to 4 of 4

Thread: How to write an ActiveX DLL that run as NT service?

  1. #1
    hn_learner
    Guest

    Question How to write an ActiveX DLL that run as NT service?

    What I need is to write a DLL that run as NT service (in VB of course), and have full feature of a service:
    - Can be Start, Stop, Restart
    - Support Start Parametter
    I can' t find documentation for the problem.
    Pls someone help..., thanks

  2. #2
    Hyperactive Member
    Join Date
    Feb 2001
    Posts
    280
    Hi,

    There is a very usefull microsoft util that will do this (if you are NT or better) - svrany.exe (Im nt and so found it on the NTRK (Resource Kit). (ms's site might be worth a try)

    Given a suitable DLL - This will load/run and it appear in the services area just like any other. If usefull I can post info when I get back to work (@home@ the moment)

    isnt hard - cheers, A.J.P.

  3. #3
    Hyperactive Member
    Join Date
    Feb 2001
    Posts
    280
    hi -

    sorry I might have lead you astray - sryany deals with exe files and turns them into services (dunno about a dll as it runs under a parent process...)

    info for an .exe

    (eg - myapp was a vb exe without a form just run from a prompt)

    myapp.exe /parm1=whatever /parm2=/somethingelse


    - from the NTRK
    - created a directory - appdir
    - copied from the cd to my dir - instsrv.exe, srvany.exe and move my app here (myapp.exe)
    - "instsrv myapp c:\appdir\srvany.exe" to create a service
    - from the service pannel - myapp - startup and specified an id/password for the service to use (or local)
    - regedt32 - localmachine - system - currentcontrolset - services - myappr - create subkey (parameters) and the following keys
    - - applicition : reg_sz: c:\appdir\myapp.exe
    - - appparameters : reg_sz : /parm1=whatever /parm2=/somethingelse
    -net start myapp

    - job done!! - bingo

  4. #4
    hn_learner
    Guest
    Sorry about the question too :-)
    All services that I've seen are .exe files.
    So I think make a DLL run as service may not possible
    In my case what I have to do is:
    - Write a COM DLL with classes
    - Write an exe file use the DLL
    I also found documentation in MSDN keyword: services [win32]
    Thanks anyway :-)

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