Class GUID
- java.lang.Object
-
- ghidra.app.util.datatype.microsoft.GUID
-
public class GUID extends java.lang.ObjectGUIDs 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.
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
Fields Modifier and Type Field Description static intSIZEOF
-
Constructor Summary
Constructors Constructor Description GUID(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.GUID(MemBuffer buf)Reads a GUID from the given memory buffer.GUID(java.lang.String guidString)Creates a GUID object using the GUID string form.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)intgetData1()Specifies the first 8 hexadecimal digits of the GUID.shortgetData2()Specifies the first group of 4 hexadecimal digits.shortgetData3()Specifies the second group of 4 hexadecimal digits.byte[]getData4()Array of 8 bytes.inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
SIZEOF
public static final int SIZEOF
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GUID
public GUID(java.lang.String guidString)
Creates a GUID object using the GUID string form.- Parameters:
guidString- - "6B29FC40-CA47-1067-B31D-00DD010662DA"- Throws:
java.lang.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
public GUID(BinaryReader reader) throws java.io.IOException
Reads a GUID from the given binary reader.- Parameters:
reader- the binary reader to read the GUID- Throws:
java.io.IOException- if an I/O error occurs while reading the GUID
-
GUID
public GUID(MemBuffer buf) throws MemoryAccessException
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 Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
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()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-