class MyStructure(Structure):
    _fields_ = [('a', c_uint8, 4), ('b', c_uint8, 2), ('c', c_uint8, 2), (
        'd', c_uint8, 2)]
mystruct = MyStructure()
mystruct.a = 0
mystruct.b = 3
mystruct.c = 0
mystruct.d = 3
v = c_uint16()
cdll.msvcrt.memcpy(byref(v), byref(mystruct), sizeof(v))
print(sizeof(mystruct))
print(bin(v.value))
Parsing binary data into ctypes Structure object via readinto()