Package org.lwjgl.system.windows
Class CRYPTPROTECT_PROMPTSTRUCT
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CRYPTPROTECT_PROMPTSTRUCT>
org.lwjgl.system.windows.CRYPTPROTECT_PROMPTSTRUCT
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class CRYPTPROTECT_PROMPTSTRUCT
extends org.lwjgl.system.Struct<CRYPTPROTECT_PROMPTSTRUCT>
implements org.lwjgl.system.NativeResource
Provides the text of a prompt and information about when and where that prompt is to be displayed when using the
Crypt32.CryptProtectData(java.nio.IntBuffer, org.lwjgl.system.windows.DATA_BLOB, java.nio.ByteBuffer, org.lwjgl.system.windows.DATA_BLOB, long, org.lwjgl.system.windows.CRYPTPROTECT_PROMPTSTRUCT, int, org.lwjgl.system.windows.DATA_BLOB) and
Crypt32.CryptUnprotectData(java.nio.IntBuffer, org.lwjgl.system.windows.DATA_BLOB, org.lwjgl.PointerBuffer, org.lwjgl.system.windows.DATA_BLOB, long, org.lwjgl.system.windows.CRYPTPROTECT_PROMPTSTRUCT, int, org.lwjgl.system.windows.DATA_BLOB) functions.
Layout
struct CRYPTPROTECT_PROMPTSTRUCT {
DWORD cbSize();
DWORD dwPromptFlags();
HWND hwndApp();
LPCWSTR szPrompt();
}-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCRYPTPROTECT_PROMPTSTRUCT(ByteBuffer container) Creates aCRYPTPROTECT_PROMPTSTRUCTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic CRYPTPROTECT_PROMPTSTRUCTcalloc()Returns a newCRYPTPROTECT_PROMPTSTRUCTinstance allocated withmemCalloc.static CRYPTPROTECT_PROMPTSTRUCTcalloc(org.lwjgl.system.MemoryStack stack) Returns a newCRYPTPROTECT_PROMPTSTRUCTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcbSize()the size, in bytes, of this structurecbSize(int value) Sets the specified value to thecbSize()field.Sets the default value to thecbSize()field.static CRYPTPROTECT_PROMPTSTRUCTcreate()Returns a newCRYPTPROTECT_PROMPTSTRUCTinstance allocated withBufferUtils.static CRYPTPROTECT_PROMPTSTRUCTcreate(long address) Returns a newCRYPTPROTECT_PROMPTSTRUCTinstance for the specified memory address.static @Nullable CRYPTPROTECT_PROMPTSTRUCTcreateSafe(long address) intflags that indicate when prompts to the user are to be displayed.dwPromptFlags(int value) Sets the specified value to thedwPromptFlags()field.longhwndApp()window handle to the parent windowhwndApp(long value) Sets the specified value to thehwndApp()field.static CRYPTPROTECT_PROMPTSTRUCTmalloc()Returns a newCRYPTPROTECT_PROMPTSTRUCTinstance allocated withmemAlloc.static CRYPTPROTECT_PROMPTSTRUCTmalloc(org.lwjgl.system.MemoryStack stack) Returns a newCRYPTPROTECT_PROMPTSTRUCTinstance allocated on the specifiedMemoryStack.static intncbSize(long struct) Unsafe version ofcbSize().static voidncbSize(long struct, int value) Unsafe version ofcbSize.static intndwPromptFlags(long struct) Unsafe version ofdwPromptFlags().static voidndwPromptFlags(long struct, int value) Unsafe version ofdwPromptFlags.static longnhwndApp(long struct) Unsafe version ofhwndApp().static voidnhwndApp(long struct, long value) Unsafe version ofhwndApp.static ByteBuffernszPrompt(long struct) Unsafe version ofszPrompt().static voidnszPrompt(long struct, ByteBuffer value) Unsafe version ofszPrompt.static StringnszPromptString(long struct) Unsafe version ofszPromptString().set(int cbSize, int dwPromptFlags, long hwndApp, ByteBuffer szPrompt) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()szPrompt()a string containing the text of a prompt to be displayedszPrompt(ByteBuffer value) Sets the address of the specified encoded string to theszPrompt()field.a string containing the text of a prompt to be displayedstatic voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
CBSIZE
public static final int CBSIZEThe struct member offsets. -
DWPROMPTFLAGS
public static final int DWPROMPTFLAGSThe struct member offsets. -
HWNDAPP
public static final int HWNDAPPThe struct member offsets. -
SZPROMPT
public static final int SZPROMPTThe struct member offsets.
-
-
Constructor Details
-
CRYPTPROTECT_PROMPTSTRUCT
Creates aCRYPTPROTECT_PROMPTSTRUCTinstance at the current position of the specifiedByteBuffercontainer. 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()- Specified by:
sizeofin classorg.lwjgl.system.Struct<CRYPTPROTECT_PROMPTSTRUCT>
-
cbSize
public int cbSize()the size, in bytes, of this structure -
dwPromptFlags
public int dwPromptFlags()flags that indicate when prompts to the user are to be displayed. One or more of:Crypt32.CRYPTPROTECT_PROMPT_ON_UNPROTECTCrypt32.CRYPTPROTECT_PROMPT_ON_PROTECT -
hwndApp
public long hwndApp()window handle to the parent window -
szPrompt
a string containing the text of a prompt to be displayed -
szPromptString
a string containing the text of a prompt to be displayed -
cbSize
Sets the specified value to thecbSize()field. -
cbSize$Default
Sets the default value to thecbSize()field. -
dwPromptFlags
Sets the specified value to thedwPromptFlags()field. -
hwndApp
Sets the specified value to thehwndApp()field. -
szPrompt
Sets the address of the specified encoded string to theszPrompt()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
Returns a newCRYPTPROTECT_PROMPTSTRUCTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCRYPTPROTECT_PROMPTSTRUCTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCRYPTPROTECT_PROMPTSTRUCTinstance allocated withBufferUtils. -
create
Returns a newCRYPTPROTECT_PROMPTSTRUCTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCRYPTPROTECT_PROMPTSTRUCTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCRYPTPROTECT_PROMPTSTRUCTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
ncbSize
public static int ncbSize(long struct) Unsafe version ofcbSize(). -
ndwPromptFlags
public static int ndwPromptFlags(long struct) Unsafe version ofdwPromptFlags(). -
nhwndApp
public static long nhwndApp(long struct) Unsafe version ofhwndApp(). -
nszPrompt
Unsafe version ofszPrompt(). -
nszPromptString
Unsafe version ofszPromptString(). -
ncbSize
public static void ncbSize(long struct, int value) Unsafe version ofcbSize. -
ndwPromptFlags
public static void ndwPromptFlags(long struct, int value) Unsafe version ofdwPromptFlags. -
nhwndApp
public static void nhwndApp(long struct, long value) Unsafe version ofhwndApp. -
nszPrompt
Unsafe version ofszPrompt. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-