Results 1 to 20 of 20

Thread: The NTService control rocks!

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769

    Talking The NTService control rocks!

    I have been told that the NTService control should not be used and is unstable. I have used it though and have had absolutely no problems. In fact, I created some of my most robust applications using this control. Can someone tell me any good reason why this control is not recommended.

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    shunt, where can one get the NTService control?
    -= a peet post =-

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    You can download it from microsoft:

    http://<br /> <a rel="nofollow" hre...srvocx.asp</a>

    or you can accept the zip from me.

    Try it out. You can even debug your service!

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    Sorry the url is:

    and here's the file:

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    The only problem with a service is that you need to be able to administer the thing. But your service is running without user interaction! Never fear, Microsoft is here!

    Try this neat designer to design snap in controls for the Microsoft Management Console! The same console used for your standard service management on Windows 2000. This is the interface they are pushing for to get standard intefaces for network administration. It is fully customizable, so you set it up with the tools you need.

    To install this designer, copy the dll's into your system32 directory and register them using regsvr32. Copy the project files to your visual basic Templates directory. Open visual basic and choose new project. The project template should show as SnapIn.

    Help on how to develop the snapin can be found here:
    http://msdn.microsoft.com/library/de...asp?frame=true

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    The only problem with a service is that you need to be able to administer the thing. But your service is running without user interaction! Never fear, Microsoft is here!

    Try this neat designer to design snap in controls for the Microsoft Management Console! The same console used for your standard service management on Windows 2000. This is the interface they are pushing for to get standard intefaces for network administration. It is fully customizable, so you set it up with the tools you need.

    To install this designer, copy the dll's into your system32 directory and register them using regsvr32. Copy the project files to your visual basic Templates directory. Open visual basic and choose new project. The project template should show as SnapIn.

    Unfortunately the dll's are too large to post on this site. I battled for ages to find them on the microsoft site and my attempts to find them now have also failed. So if you are interested, post your e-mail address and i'll mail them to you. The total size is 376kb.

    The names of the components are: mmcproxy.dll, mssnapd.ocx, mssnapr.dll

    If I find the download path, I will post it here. I have attached the project though.

    Help on how to develop the snapin can be found here:
    http://msdn.microsoft.com/library/de...asp?frame=true

  7. #7
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    this is great shunt !

    just what I need for one of my apps.

    Thanks
    -= a peet post =-

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    I am also investigating their WMI (Windows Management Interfaces). I don't quite understand it yet, but it seems to be along the network administration lines. They also speak about it a lot with MMC. But I'm still not quite sure how it fits into the picture. If anyone finds out before me, please drop me a line.

    I have just done a service using the NTService control. I have it installed at numerous pc's here at work. These services are comunicating with production machinery, but are running on pc's that have real dfu user enteraction. These users have no pc skills at all and can barely use a mouse. The service has solved a million and one problems which used to occur with the previous version of the app. I have also recently added a winsock control and an xml parser to the app and integrated that with the mmc snapin. I can now administer any one of these services remotely via dial up connection.

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    Sorry, WMI actualy stands for Windows Management Instrumentation.

  10. #10
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    Originally posted by shunt
    The only problem with a service is that you need to be able to administer the thing. But your service is running without user interaction! Never fear, Microsoft is here!

    Try this neat designer to design snap in controls for the Microsoft Management Console! The same console used for your standard service management on Windows 2000. This is the interface they are pushing for to get standard intefaces for network administration. It is fully customizable, so you set it up with the tools you need.

    To install this designer, copy the dll's into your system32 directory and register them using regsvr32. Copy the project files to your visual basic Templates directory. Open visual basic and choose new project. The project template should show as SnapIn.

    Unfortunately the dll's are too large to post on this site. I battled for ages to find them on the microsoft site and my attempts to find them now have also failed. So if you are interested, post your e-mail address and i'll mail them to you. The total size is 376kb.

    The names of the components are: mmcproxy.dll, mssnapd.ocx, mssnapr.dll

    If I find the download path, I will post it here. I have attached the project though.

    Help on how to develop the snapin can be found here:
    http://msdn.microsoft.com/library/de...asp?frame=true
    hi again shunt, please send the dll's and ocx to [email protected]
    much appreciated

    peet
    -= a peet post =-

  11. #11
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    shunt, where can I find the Log that the LogEvent methode logs to ??
    -= a peet post =-

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    The LogEvent method logs events in the same method as the app.logevent method. So where ever you have your application logging set up to go, that is where your logevent will put it. In my case, I am using the standard windows event log. So all my logs go into the application log viewable through the event viewer. By using the services logevent method instead of the app.logevent, the event will receive the services name instead of "VBRuntime". So you will be able to distinguish between your many services.

    Also note that under win2k and higher, the event viewer is also an mmc snapin!

  13. #13

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    An added note to the logging. If the logging is not set up for circular logging, and the log becomes full, an error is generated when trying to write to the application log. So don't forget to write error trapping for your event logging. It might be a good idea to have a backup source to write to.

    Did you also know that you can connect to a remote pc's event viewer using windows event viewer and mmc?

  14. #14
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    thanks for ********ing shunt

    could u send me the files (mmcproxy.dll, mssnapd.ocx, mssnapr.dll ) ? [email protected]
    -= a peet post =-

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769

    Lightbulb

    Here is some pretty awesome information on WMI!

    http://www.microsoft.com/windows2000...nt/wmiprov.asp

  16. #16

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    I have only one problem with running my apps as services. If the application is running without interaction, then I cannot display anything at all. I have tried using an icon in the systray, but it doesn't show until I enable interaction with the service. Has anyone found a way around this?

  17. #17

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    I found an article in msdn about creating windows services in C++. It said that C++ was also not ideal for creating windows services and that to the best would be to use C. How far do you have to go before coding in 1's and 0's?

    Anyway, I now have the samples for the MMC snapin if anyone is interested. Post your email address and I will mail them to you.

  18. #18
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    100011100010100001111101
    010001010101000000000010
    101010111010101011101000
    001101010011110000000000

  19. #19
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    here's hello in 1's and 0's"
    011001100111110011001100011100
    011001100110000011001100100010
    011111100111110011001100100010
    011111100110000011001100100010
    011001100110000011001100100010
    011001100111110011001100011100

    a bit hard to see........ hmmm..
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  20. #20
    ALFWare
    Guest

    Would appreciate the samples

    I have a program which is basically a service but want to make it a service... Could you please provide the samples files and the three components required to :

    [email protected]

    I would appreciate that greatly... I am also making a VB sample and download site and will add it to that. Thanks

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