Interface Advapi32

  • All Superinterfaces:
    com.sun.jna.AltCallingConvention, com.sun.jna.Library, com.sun.jna.win32.StdCall, com.sun.jna.win32.StdCallLibrary

    public interface Advapi32
    extends com.sun.jna.win32.StdCallLibrary
    Author:
    TB
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Advapi32 INSTANCE  
      • Fields inherited from interface com.sun.jna.Library

        OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER
      • Fields inherited from interface com.sun.jna.win32.StdCallLibrary

        FUNCTION_MAPPER, STDCALL_CONVENTION
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean ChangeServiceConfig2​(com.sun.jna.Pointer hService, int dwInfoLevel, Advapi32.ChangeServiceConfig2Info lpInfo)  
      boolean CloseServiceHandle​(com.sun.jna.Pointer hSCObject)  
      boolean ControlService​(com.sun.jna.Pointer hService, int dwControl, Advapi32.SERVICE_STATUS lpServiceStatus)  
      boolean ConvertSidToStringSid​(byte[] Sid, com.sun.jna.ptr.PointerByReference StringSid)  
      boolean ConvertStringSidToSid​(String StringSid, com.sun.jna.ptr.PointerByReference Sid)  
      com.sun.jna.Pointer CreateService​(com.sun.jna.Pointer hSCManager, String lpServiceName, String lpDisplayName, int dwDesiredAccess, int dwServiceType, int dwStartType, int dwErrorControl, String lpBinaryPathName, String lpLoadOrderGroup, com.sun.jna.ptr.IntByReference lpdwTagId, String lpDependencies, String lpServiceStartName, String lpPassword)  
      boolean DeleteService​(com.sun.jna.Pointer hService)  
      boolean GetUserName​(char[] buffer, com.sun.jna.ptr.IntByReference lpnSize)
      Retrieves the name of the user associated with the current thread.
      boolean LookupAccountName​(String lpSystemName, String lpAccountName, byte[] Sid, com.sun.jna.ptr.IntByReference cbSid, char[] ReferencedDomainName, com.sun.jna.ptr.IntByReference cchReferencedDomainName, com.sun.jna.ptr.PointerByReference peUse)  
      boolean LookupAccountSid​(String lpSystemName, byte[] Sid, char[] lpName, com.sun.jna.ptr.IntByReference cchName, char[] ReferencedDomainName, com.sun.jna.ptr.IntByReference cchReferencedDomainName, com.sun.jna.ptr.PointerByReference peUse)  
      com.sun.jna.Pointer OpenSCManager​(String lpMachineName, com.sun.jna.WString lpDatabaseName, int dwDesiredAccess)  
      com.sun.jna.Pointer OpenService​(com.sun.jna.Pointer hSCManager, String lpServiceName, int dwDesiredAccess)  
      int RegCloseKey​(int hKey)  
      int RegCreateKeyEx​(int hKey, String lpSubKey, int Reserved, String lpClass, int dwOptions, int samDesired, WINBASE.SECURITY_ATTRIBUTES lpSecurityAttributes, com.sun.jna.ptr.IntByReference phkResult, com.sun.jna.ptr.IntByReference lpdwDisposition)  
      int RegDeleteKey​(int hKey, String name)  
      int RegDeleteValue​(int hKey, String lpValueName)  
      int RegEnumKeyEx​(int hKey, int dwIndex, char[] lpName, com.sun.jna.ptr.IntByReference lpcName, com.sun.jna.ptr.IntByReference reserved, char[] lpClass, com.sun.jna.ptr.IntByReference lpcClass, WINBASE.FILETIME lpftLastWriteTime)  
      int RegEnumValue​(int hKey, int dwIndex, char[] lpValueName, com.sun.jna.ptr.IntByReference lpcchValueName, com.sun.jna.ptr.IntByReference reserved, com.sun.jna.ptr.IntByReference lpType, byte[] lpData, com.sun.jna.ptr.IntByReference lpcbData)  
      com.sun.jna.Pointer RegisterServiceCtrlHandler​(String lpServiceName, Advapi32.Handler lpHandlerProc)  
      com.sun.jna.Pointer RegisterServiceCtrlHandlerEx​(String lpServiceName, Advapi32.HandlerEx lpHandlerProc, com.sun.jna.Pointer lpContext)  
      int RegOpenKeyEx​(int hKey, String lpSubKey, int ulOptions, int samDesired, com.sun.jna.ptr.IntByReference phkResult)  
      int RegQueryValueEx​(int hKey, String lpValueName, com.sun.jna.ptr.IntByReference lpReserved, com.sun.jna.ptr.IntByReference lpType, byte[] lpData, com.sun.jna.ptr.IntByReference lpcbData)  
      int RegSetValueEx​(int hKey, String lpValueName, int Reserved, int dwType, byte[] lpData, int cbData)  
      boolean SetServiceStatus​(com.sun.jna.Pointer hServiceStatus, Advapi32.SERVICE_STATUS lpServiceStatus)  
      boolean StartService​(com.sun.jna.Pointer hService, int dwNumServiceArgs, char[] lpServiceArgVectors)  
      boolean StartServiceCtrlDispatcher​(com.sun.jna.Structure[] lpServiceTable)  
    • Field Detail

      • INSTANCE

        static final Advapi32 INSTANCE
    • Method Detail

      • GetUserName

        boolean GetUserName​(char[] buffer,
                            com.sun.jna.ptr.IntByReference lpnSize)
        Retrieves the name of the user associated with the current thread.

        See GetUserNameA function (winbase.h)

      • LookupAccountName

        boolean LookupAccountName​(String lpSystemName,
                                  String lpAccountName,
                                  byte[] Sid,
                                  com.sun.jna.ptr.IntByReference cbSid,
                                  char[] ReferencedDomainName,
                                  com.sun.jna.ptr.IntByReference cchReferencedDomainName,
                                  com.sun.jna.ptr.PointerByReference peUse)
      • LookupAccountSid

        boolean LookupAccountSid​(String lpSystemName,
                                 byte[] Sid,
                                 char[] lpName,
                                 com.sun.jna.ptr.IntByReference cchName,
                                 char[] ReferencedDomainName,
                                 com.sun.jna.ptr.IntByReference cchReferencedDomainName,
                                 com.sun.jna.ptr.PointerByReference peUse)
      • ConvertSidToStringSid

        boolean ConvertSidToStringSid​(byte[] Sid,
                                      com.sun.jna.ptr.PointerByReference StringSid)
      • ConvertStringSidToSid

        boolean ConvertStringSidToSid​(String StringSid,
                                      com.sun.jna.ptr.PointerByReference Sid)
      • OpenSCManager

        com.sun.jna.Pointer OpenSCManager​(String lpMachineName,
                                          com.sun.jna.WString lpDatabaseName,
                                          int dwDesiredAccess)
      • CloseServiceHandle

        boolean CloseServiceHandle​(com.sun.jna.Pointer hSCObject)
      • OpenService

        com.sun.jna.Pointer OpenService​(com.sun.jna.Pointer hSCManager,
                                        String lpServiceName,
                                        int dwDesiredAccess)
      • StartService

        boolean StartService​(com.sun.jna.Pointer hService,
                             int dwNumServiceArgs,
                             char[] lpServiceArgVectors)
      • ControlService

        boolean ControlService​(com.sun.jna.Pointer hService,
                               int dwControl,
                               Advapi32.SERVICE_STATUS lpServiceStatus)
      • StartServiceCtrlDispatcher

        boolean StartServiceCtrlDispatcher​(com.sun.jna.Structure[] lpServiceTable)
      • RegisterServiceCtrlHandler

        com.sun.jna.Pointer RegisterServiceCtrlHandler​(String lpServiceName,
                                                       Advapi32.Handler lpHandlerProc)
      • RegisterServiceCtrlHandlerEx

        com.sun.jna.Pointer RegisterServiceCtrlHandlerEx​(String lpServiceName,
                                                         Advapi32.HandlerEx lpHandlerProc,
                                                         com.sun.jna.Pointer lpContext)
      • SetServiceStatus

        boolean SetServiceStatus​(com.sun.jna.Pointer hServiceStatus,
                                 Advapi32.SERVICE_STATUS lpServiceStatus)
      • CreateService

        com.sun.jna.Pointer CreateService​(com.sun.jna.Pointer hSCManager,
                                          String lpServiceName,
                                          String lpDisplayName,
                                          int dwDesiredAccess,
                                          int dwServiceType,
                                          int dwStartType,
                                          int dwErrorControl,
                                          String lpBinaryPathName,
                                          String lpLoadOrderGroup,
                                          com.sun.jna.ptr.IntByReference lpdwTagId,
                                          String lpDependencies,
                                          String lpServiceStartName,
                                          String lpPassword)
      • DeleteService

        boolean DeleteService​(com.sun.jna.Pointer hService)
      • RegOpenKeyEx

        int RegOpenKeyEx​(int hKey,
                         String lpSubKey,
                         int ulOptions,
                         int samDesired,
                         com.sun.jna.ptr.IntByReference phkResult)
      • RegQueryValueEx

        int RegQueryValueEx​(int hKey,
                            String lpValueName,
                            com.sun.jna.ptr.IntByReference lpReserved,
                            com.sun.jna.ptr.IntByReference lpType,
                            byte[] lpData,
                            com.sun.jna.ptr.IntByReference lpcbData)
      • RegCloseKey

        int RegCloseKey​(int hKey)
      • RegDeleteValue

        int RegDeleteValue​(int hKey,
                           String lpValueName)
      • RegSetValueEx

        int RegSetValueEx​(int hKey,
                          String lpValueName,
                          int Reserved,
                          int dwType,
                          byte[] lpData,
                          int cbData)
      • RegCreateKeyEx

        int RegCreateKeyEx​(int hKey,
                           String lpSubKey,
                           int Reserved,
                           String lpClass,
                           int dwOptions,
                           int samDesired,
                           WINBASE.SECURITY_ATTRIBUTES lpSecurityAttributes,
                           com.sun.jna.ptr.IntByReference phkResult,
                           com.sun.jna.ptr.IntByReference lpdwDisposition)
      • RegDeleteKey

        int RegDeleteKey​(int hKey,
                         String name)
      • RegEnumKeyEx

        int RegEnumKeyEx​(int hKey,
                         int dwIndex,
                         char[] lpName,
                         com.sun.jna.ptr.IntByReference lpcName,
                         com.sun.jna.ptr.IntByReference reserved,
                         char[] lpClass,
                         com.sun.jna.ptr.IntByReference lpcClass,
                         WINBASE.FILETIME lpftLastWriteTime)
      • RegEnumValue

        int RegEnumValue​(int hKey,
                         int dwIndex,
                         char[] lpValueName,
                         com.sun.jna.ptr.IntByReference lpcchValueName,
                         com.sun.jna.ptr.IntByReference reserved,
                         com.sun.jna.ptr.IntByReference lpType,
                         byte[] lpData,
                         com.sun.jna.ptr.IntByReference lpcbData)