Psapi (JNA API)

com.sun.jna.platform.win32

## Interface Psapi

- All Superinterfaces:
    AltCallingConvention, Library, StdCall, StdCallLibrary

      public interface Psapi
      extends StdCallLibrary

  The process status application programming interface (PSAPI) is a helper library that makes it easier for you to obtain information about processes and device drivers.
  Author:
    Andreas "PAX" Lück, onkelpax-git[at]yahoo.de

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.sun.jna.win32.StdCallLibrary

      `StdCallLibrary.StdCallCallback`

    - ### Nested classes/interfaces inherited from interface com.sun.jna.Library

      `Library.Handler`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Psapi` | `INSTANCE`

    - ### Fields inherited from interface com.sun.jna.win32.StdCallLibrary

      `FUNCTION_MAPPER, STDCALL_CONVENTION`

    - ### 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_TYPE_MAPPER`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `GetModuleFileNameEx(WinNT.HANDLE process, WinNT.HANDLE module, Pointer lpFilename, int nSize)` Retrieves the fully qualified path for the file containing the specified module.
    `int` | `GetModuleFileNameExA(WinNT.HANDLE process, WinNT.HANDLE module, byte[] lpFilename, int nSize)` Retrieves the fully qualified path for the file containing the specified module.
    `int` | `GetModuleFileNameExW(WinNT.HANDLE process, WinNT.HANDLE module, char[] lpFilename, int nSize)` Retrieves the fully qualified path for the file containing the specified module.

- - ### Field Detail

    - #### INSTANCE

          static final Psapi INSTANCE

  - ### Method Detail

    - #### GetModuleFileNameExA

          int GetModuleFileNameExA(WinNT.HANDLE process,
                                 WinNT.HANDLE module,
                                 byte[] lpFilename,
                                 int nSize)

      Retrieves the fully qualified path for the file containing the specified module.
      Parameters:
        `process` - A handle to the process that contains the module.
        `module` - A handle to the module. If this parameter is NULL, GetModuleFileNameEx returns the path of the executable file of the process specified in hProcess.
        `lpFilename` - A pointer to a buffer that receives the fully qualified path to the module. If the size of the file name is larger than the value of the nSize parameter, the function succeeds but the file name is truncated and null-terminated.
        `nSize` - The size of the lpFilename buffer, in characters.
      Returns:
        If the function succeeds, the return value specifies the length of the string copied to the buffer. If the function fails, the return value is zero. To get extended error information, call `Kernel32Util.getLastErrorMessage()`.

    - #### GetModuleFileNameExW

          int GetModuleFileNameExW(WinNT.HANDLE process,
                                 WinNT.HANDLE module,
                                 char[] lpFilename,
                                 int nSize)

      Retrieves the fully qualified path for the file containing the specified module.
      Parameters:
        `process` - A handle to the process that contains the module.
        `module` - A handle to the module. If this parameter is NULL, GetModuleFileNameEx returns the path of the executable file of the process specified in hProcess.
        `lpFilename` - A pointer to a buffer that receives the fully qualified path to the module. If the size of the file name is larger than the value of the nSize parameter, the function succeeds but the file name is truncated and null-terminated.
        `nSize` - The size of the lpFilename buffer, in characters.
      Returns:
        If the function succeeds, the return value specifies the length of the string copied to the buffer. If the function fails, the return value is zero. To get extended error information, call `Kernel32Util.getLastErrorMessage()`.

    - #### GetModuleFileNameEx

          int GetModuleFileNameEx(WinNT.HANDLE process,
                                WinNT.HANDLE module,
                                Pointer lpFilename,
                                int nSize)

      Retrieves the fully qualified path for the file containing the specified module.
      Parameters:
        `process` - A handle to the process that contains the module.
        `module` - A handle to the module. If this parameter is NULL, GetModuleFileNameEx returns the path of the executable file of the process specified in hProcess.
        `lpFilename` - A pointer to a buffer that receives the fully qualified path to the module. If the size of the file name is larger than the value of the nSize parameter, the function succeeds but the file name is truncated and null-terminated.
        `nSize` - The size of the lpFilename buffer, in characters.
      Returns:
        If the function succeeds, the return value specifies the length of the string copied to the buffer. If the function fails, the return value is zero. To get extended error information, call `Kernel32Util.getLastErrorMessage()`.

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