Class GUID
java.lang.Object
ghidra.app.util.datatype.microsoft.GUID
GUIDs identify objects such as interfaces, manager entry-point vectors (EPVs),
and class objects. A GUID is a 128-bit value consisting of one group
of 8 hexadecimal digits, followed by three groups of 4 hexadecimal
digits each, followed by one group of 12 hexadecimal digits. The
following example shows the groupings of hexadecimal digits in a GUID.
Data2 - Specifies the first group of 4 hexadecimal digits.
Data3 - Specifies the second group of 4 hexadecimal digits.
Data4 - Array of 8 bytes. The first 2 bytes contain the third group of 4 hexadecimal digits. The remaining 6 bytes contain the final 12 hexadecimal digits.
6B29FC40-CA47-1067-B31D-00DD010662DA
typedef struct _GUID { DWORD Data1; WORD Data2; WORD Data3; BYTE Data4[8]; } GUID;Data1 - Specifies the first 8 hexadecimal digits of the GUID.
Data2 - Specifies the first group of 4 hexadecimal digits.
Data3 - Specifies the second group of 4 hexadecimal digits.
Data4 - Array of 8 bytes. The first 2 bytes contain the third group of 4 hexadecimal digits. The remaining 6 bytes contain the final 12 hexadecimal digits.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGUID
(int data1, short data2, short data3, byte[] data4) Constructs a GUID using the constitute pieces.GUID
(BinaryReader reader) Reads a GUID from the given binary reader.Reads a GUID from the given memory buffer.Creates a GUID object using the GUID string form. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
getData1()
Specifies the first 8 hexadecimal digits of the GUID.short
getData2()
Specifies the first group of 4 hexadecimal digits.short
getData3()
Specifies the second group of 4 hexadecimal digits.byte[]
getData4()
Array of 8 bytes.int
hashCode()
toString()
-
Field Details
-
SIZEOF
public static final int SIZEOF- See Also:
-
-
Constructor Details
-
GUID
Creates a GUID object using the GUID string form.- Parameters:
guidString
- - either with or without dashes between parts - "6B29FC40-CA47-1067-B31D-00DD010662DA", or "6B29FC40CA471067B31D00DD010662DA", and with or without leading and trailing "{" "}" characters- Throws:
IllegalArgumentException
- if string does not represent a valid GUID
-
GUID
public GUID(int data1, short data2, short data3, byte[] data4) Constructs a GUID using the constitute pieces. -
GUID
Reads a GUID from the given binary reader.- Parameters:
reader
- the binary reader to read the GUID- Throws:
IOException
- if an I/O error occurs while reading the GUID
-
GUID
Reads a GUID from the given memory buffer.- Parameters:
buf
- the memory buffer to read the GUID- Throws:
MemoryAccessException
- if an error occurs while reading the GUID
-
-
Method Details
-
toString
-
getData1
public int getData1()Specifies the first 8 hexadecimal digits of the GUID.- Returns:
-
getData2
public short getData2()Specifies the first group of 4 hexadecimal digits.- Returns:
-
getData3
public short getData3()Specifies the second group of 4 hexadecimal digits.- Returns:
-
getData4
public byte[] getData4()Array of 8 bytes. The first 2 bytes contain the third group of 4 hexadecimal digits. The remaining 6 bytes contain the final 12 hexadecimal digits.- Returns:
-
hashCode
public int hashCode() -
equals
-