'C typedef struct with pragma translated to Python in python

I have this C-Headerfile:

#pragma pack (push,1)
typedef struct {
  uint16_t DLLFailureCode;
  uint8_t ConnectionStatus;
  uint32_t SystemFailureCode;
} TConnectionResult;

How would you implement the equivalent to this in Python (if that is even possible)?

I tried the following way, but it doesn't seem right: Why?

from ctypes import *
    class Program:
        def __init__(self):
            self.DLL = CDLL(os.path.join(r"C:\Users\...\PycharmProjects\Program\epMCOMLib.dll"))
    
            self.Handle = c_uint32(0)
            self.Handle_p = pointer(self.Handle)
    
        def QueryOpenConnectionStatus(self):
            p = POINT(0, 0, 0)
            p_p = pointer(p)
            print("OpenQuery", self.DLL.QueryOpenConnectionStatus(self.Handle, p_p))
            print(p.DLLFailureCode, p.ConnectionStatus, p.SystemFailureCode)
    
        class POINT(Structure):
            _pack_ = 1
            _fields_ = [
                ('DLLFailureCode', c_uint16),
                ('ConnectionStatus', c_uint8),
                ('SystemFailureCode', c_uint32)]

My goal is to be able to run the following method successfully in Python:

   DLLIMPORT void __cdecl QueryOpenConnectionStatus(uint32_t Handle,
                                                 TConnectionResult * Result);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source