• λ我爱Aspx >> Asp.Net >> Create and Control Windows Services--Not a Slap Shot, but Almost as Fast[等级:高级]
  • Create and Control Windows Services--Not a Slap Shot, but Almost as Fast[等级:高级]

  • :aspxer  Դ:internet  :2007-5-28 20:37:29  ؼ:
  • Create and Control Windows Services--Not a Slap Shot, but Almost as Fast[等级:高级]

    a Slap Shot, but Almost as Fast

    Creating the service using .NET is fairly straightforward. You use the .NET Framework@#s System.ServiceProcess namespace and four classes within it: ServiceBase, ServiceInstaller, ServiceProcessInstaller, and ServiceController. These classes provide most of the functionality you need to create a service (see Figure 1).

    Figure 1 | Everything You Need in One Namespace. Click here.

    The ServiceBase class defines methods a derived class can override so the Service Control Manager can control a service—including OnStart(), OnStop(), OnPause(), and OnContinue(). Furthermore, a service can override the OnCustomCommand() function to carry out specific operations sent to it programmatically by an external service controller (more on this later). Implementing these functions in your derived class gives you the necessary structure of a service:

    Ҷƪл˵?
  • һƪCreate and Control Windows Services--introduction[等级:高级]
    һƪConsuming a Webservice Part 2 of 2[等级:高级](转载:aspfree)