Sspi.SecPkgCredentials_Names (JNA API)
Description: declaration: package: com.sun.jna.platform.win32, interface: Sspi, class: SecPkgCredentials_Names

Package com.sun.jna.platform.win32

# Class Sspi.SecPkgCredentials_Names

java.lang.Object
com.sun.jna.Structure
com.sun.jna.platform.win32.Sspi.SecPkgCredentials_Names

Direct Known Subclasses:
  `Sspi.SecPkgCredentials_Names.ByReference`

Enclosing interface:
  Sspi

@FieldOrder("sUserName") public static class Sspi.SecPkgCredentials_Names extends Structure
The SecPkgCredentials_Names structure holds the name of the user associated with a context.

The `Secur32.QueryCredentialsAttributes(com.sun.jna.platform.win32.Sspi.CredHandle, int, com.sun.jna.Structure)` function uses this structure.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `Sspi.SecPkgCredentials_Names.ByReference`

  ## Nested classes/interfaces inherited from class com.sun.jna.Structure

  `Structure.ByValue, Structure.FieldOrder, Structure.StructField`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `Pointer`
  `sUserName`
  Pointer to a null-terminated string containing the name of the user represented by the credential.

  ### Fields inherited from class com.sun.jna.Structure

  `ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SecPkgCredentials_Names()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `free()`
  Free native buffer
  `String`
  `getUserName()`

  ### Methods inherited from class com.sun.jna.Structure

  `allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFieldOrder, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, read, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField`

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### sUserName

    public Pointer sUserName
    Pointer to a null-terminated string containing the name of the user represented by the credential. If the security package sets the SECPKG_FLAG_ACCEPT_WIN32_NAME flag to indicate that it can process Windows names, this name can be used in other Windows calls.

- ## Constructor Details

  - ### SecPkgCredentials_Names

    public SecPkgCredentials_Names()

- ## Method Details

  - ### getUserName

    public String getUserName()
    Returns:
      value of userName attribute

  - ### free

    public int free()
    Free native buffer
    Returns:
      `WinError.SEC_E_OK` if ok