Class CRYPTPROTECT_PROMPTSTRUCT

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class CRYPTPROTECT_PROMPTSTRUCT extends Struct<CRYPTPROTECT_PROMPTSTRUCT> implements NativeResource

 struct CRYPTPROTECT_PROMPTSTRUCT {
     DWORD cbSize;
     DWORD dwPromptFlags;
     HWND hwndApp;
     LPCWSTR szPrompt;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • CBSIZE

      public static final int CBSIZE
      The struct member offsets.
    • DWPROMPTFLAGS

      public static final int DWPROMPTFLAGS
      The struct member offsets.
    • HWNDAPP

      public static final int HWNDAPP
      The struct member offsets.
    • SZPROMPT

      public static final int SZPROMPT
      The struct member offsets.
  • Constructor Details

    • CRYPTPROTECT_PROMPTSTRUCT

      public CRYPTPROTECT_PROMPTSTRUCT(ByteBuffer container)
      Creates a CRYPTPROTECT_PROMPTSTRUCT instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<CRYPTPROTECT_PROMPTSTRUCT>
    • cbSize

      public int cbSize()
      Returns:
      the value of the cbSize field.
    • dwPromptFlags

      public int dwPromptFlags()
      Returns:
      the value of the dwPromptFlags field.
    • hwndApp

      public long hwndApp()
      Returns:
      the value of the hwndApp field.
    • szPrompt

      public ByteBuffer szPrompt()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the szPrompt field.
    • szPromptString

      public String szPromptString()
      Returns:
      the null-terminated string pointed to by the szPrompt field.
    • cbSize

      public CRYPTPROTECT_PROMPTSTRUCT cbSize(int value)
      Sets the specified value to the cbSize field.
    • cbSize$Default

      public CRYPTPROTECT_PROMPTSTRUCT cbSize$Default()
      Sets the default value to the cbSize field.
    • dwPromptFlags

      public CRYPTPROTECT_PROMPTSTRUCT dwPromptFlags(int value)
      Sets the specified value to the dwPromptFlags field.
    • hwndApp

      public CRYPTPROTECT_PROMPTSTRUCT hwndApp(long value)
      Sets the specified value to the hwndApp field.
    • szPrompt

      public CRYPTPROTECT_PROMPTSTRUCT szPrompt(ByteBuffer value)
      Sets the address of the specified encoded string to the szPrompt field.
    • set

      public CRYPTPROTECT_PROMPTSTRUCT set(int cbSize, int dwPromptFlags, long hwndApp, ByteBuffer szPrompt)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static CRYPTPROTECT_PROMPTSTRUCT malloc()
      Returns a new CRYPTPROTECT_PROMPTSTRUCT instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static CRYPTPROTECT_PROMPTSTRUCT calloc()
      Returns a new CRYPTPROTECT_PROMPTSTRUCT instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static CRYPTPROTECT_PROMPTSTRUCT create()
      Returns a new CRYPTPROTECT_PROMPTSTRUCT instance allocated with BufferUtils.
    • create

      public static CRYPTPROTECT_PROMPTSTRUCT create(long address)
      Returns a new CRYPTPROTECT_PROMPTSTRUCT instance for the specified memory address.
    • createSafe

      public static @Nullable CRYPTPROTECT_PROMPTSTRUCT createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static CRYPTPROTECT_PROMPTSTRUCT malloc(MemoryStack stack)
      Returns a new CRYPTPROTECT_PROMPTSTRUCT instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static CRYPTPROTECT_PROMPTSTRUCT calloc(MemoryStack stack)
      Returns a new CRYPTPROTECT_PROMPTSTRUCT instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • ncbSize

      public static int ncbSize(long struct)
      Unsafe version of cbSize().
    • ndwPromptFlags

      public static int ndwPromptFlags(long struct)
      Unsafe version of dwPromptFlags().
    • nhwndApp

      public static long nhwndApp(long struct)
      Unsafe version of hwndApp().
    • nszPrompt

      public static ByteBuffer nszPrompt(long struct)
      Unsafe version of szPrompt().
    • nszPromptString

      public static String nszPromptString(long struct)
      Unsafe version of szPromptString().
    • ncbSize

      public static void ncbSize(long struct, int value)
      Unsafe version of cbSize.
    • ndwPromptFlags

      public static void ndwPromptFlags(long struct, int value)
      Unsafe version of dwPromptFlags.
    • nhwndApp

      public static void nhwndApp(long struct, long value)
      Unsafe version of hwndApp.
    • nszPrompt

      public static void nszPrompt(long struct, ByteBuffer value)
      Unsafe version of szPrompt.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate