Class GuidFFM

java.lang.Object
oshi.ffm.windows.com.GuidFFM

public final class GuidFFM extends Object
FFM representation of the Windows GUID structure.

A GUID (Globally Unique Identifier) is a 128-bit value used to identify COM interfaces and classes.

  • Field Details

    • LAYOUT

      public static final StructLayout LAYOUT
      The memory layout of a GUID structure (16 bytes).
    • SIZE

      public static final long SIZE
      Size of a GUID in bytes.
  • Method Details

    • create

      public static MemorySegment create(Arena arena, int data1, short data2, short data3, byte... data4)
      Creates a GUID memory segment from its components.
      Parameters:
      arena - the arena for memory allocation
      data1 - the first 4 bytes (big-endian)
      data2 - the next 2 bytes (big-endian)
      data3 - the next 2 bytes (big-endian)
      data4 - the remaining 8 bytes
      Returns:
      a memory segment containing the GUID
    • create

      public static MemorySegment create(Arena arena, int data1, int data2, int data3, int d4_0, int d4_1, int d4_2, int d4_3, int d4_4, int d4_5, int d4_6, int d4_7)
      Creates a GUID memory segment from its components using integer values for convenience.
      Parameters:
      arena - the arena for memory allocation
      data1 - the first 4 bytes
      data2 - the next 2 bytes
      data3 - the next 2 bytes
      d4_0 - data4[0]
      d4_1 - data4[1]
      d4_2 - data4[2]
      d4_3 - data4[3]
      d4_4 - data4[4]
      d4_5 - data4[5]
      d4_6 - data4[6]
      d4_7 - data4[7]
      Returns:
      a memory segment containing the GUID
    • CLSID_WbemLocator

      public static MemorySegment CLSID_WbemLocator(Arena arena)
      CLSID_WbemLocator: {4590F811-1D3A-11D0-891F-00AA004B2E24}
      Parameters:
      arena - the arena for memory allocation
      Returns:
      a memory segment containing the CLSID_WbemLocator GUID
    • IID_IWbemLocator

      public static MemorySegment IID_IWbemLocator(Arena arena)
      IID_IWbemLocator: {DC12A687-737F-11CF-884D-00AA004B2E24}
      Parameters:
      arena - the arena for memory allocation
      Returns:
      a memory segment containing the IID_IWbemLocator GUID
    • IID_IUnknown

      public static MemorySegment IID_IUnknown(Arena arena)
      IID_IUnknown: {00000000-0000-0000-C000-000000000046}
      Parameters:
      arena - the arena for memory allocation
      Returns:
      a memory segment containing the IID_IUnknown GUID