com.sun.jna.platform.win32

## Class W32ServiceManager

- java.lang.Object
- - com.sun.jna.platform.win32.W32ServiceManager

-     public class W32ServiceManager
      extends java.lang.Object

  Win32 Service Manager wrapper
  Author:
    EugineLev

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) java.lang.String` | `_databaseName`
    `(package private) Winsvc.SC_HANDLE` | `_handle`
    `(package private) java.lang.String` | `_machineName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `W32ServiceManager()`
    `W32ServiceManager(java.lang.String machineName, java.lang.String databaseName)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes the previously opened Service Manager.
    `Winsvc.SC_HANDLE` | `getHandle()` Gets the service manager handle.
    `void` | `open(int permissions)` Opens the Service Manager with the supplied permissions.
    `W32Service` | `openService(java.lang.String serviceName, int permissions)` Opens a Service.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### _handle

          Winsvc.SC_HANDLE _handle

    - #### _machineName

          java.lang.String _machineName

    - #### _databaseName

          java.lang.String _databaseName

  - ### Constructor Detail

    - #### W32ServiceManager

          public W32ServiceManager()

    - #### W32ServiceManager

          public W32ServiceManager(java.lang.String machineName,
                                   java.lang.String databaseName)

  - ### Method Detail

    - #### open

          public void open(int permissions)

      Opens the Service Manager with the supplied permissions.
      Parameters:
        `permissions` - Permissions.

    - #### close

          public void close()

      Closes the previously opened Service Manager.

    - #### openService

          public W32Service openService(java.lang.String serviceName,
                                        int permissions)

      Opens a Service.
      Parameters:
        `serviceName` - Service name.
        `permissions` - Permissions.
      Returns:
        Returns an opened service.

    - #### getHandle

          public Winsvc.SC_HANDLE getHandle()

      Gets the service manager handle.
      Returns:
        Returns the service manager handle.

Copyright © 2007-2016 Timothy Wall. All Rights Reserved.