You can use the AddressSpace class to read the UID of a G30. Here’s an example of doing so (I think the actual address may not be correct, but the idea is there.)
Maybe you can use this class to do what you want as well.
So in the important call the first argument is the address cast as uint. Then the second argument is the buffer into which he is storing th e read which is a 12 byte array. Then he uses the last two arguments to say start from an offset of zero and read 12 bytes because he knows the UID is a 96 bit value.