I'm having a problem with my structure generation to allow the use of a c Library within Python - I'm hoping someone can point out the errors in my code.
C Prototype:
const char *DSpotterVerInfo(char *lpchLicenseFile, VerInfo *lpVerInfo, INT *lpnErr);
C Struct Definition:
typedef struct _VerInfo
{
    const char *SDKName;
    const char *SDKVersion;
    const char *SDKType;
    const char *Date;
    const char *LType;
    BOOL  bTrialVersion;
} VerInfo;
My code:
class DSVerInfo(ctypes.Structure):
  # This works (at least no ugly errors, but I can't get to the structure data..)
  #_fields_ = [('Name',ctypes.c_char_p)]
  # This defintion causes an error and a segdump
  _fields_ = [ \
                 ('Name', ctypes.c_char_p), \
                 ('Version', ctypes.c_char_p), \
                 ('SDKType', ctypes.c_char_p), \
                 ('Date', ctypes.c_char_p), \
                 ('LicType', ctypes.c_char_p), \
                 ('Trial', ctypes.c_bool) \
              ]
  def __init__(self):
    self.Name = cast(ctypes.create_string_buffer(str.encode("")),ctypes.c_char_p)
    self.Version = cast(ctypes.create_string_buffer(str.encode("")),ctypes.c_char_p)
    self.SDKType = cast(ctypes.create_string_buffer(str.encode("")),ctypes.c_char_p)
    self.Date = cast(ctypes.create_string_buffer(str.encode("")),ctypes.c_char_p)
    self.LicType = cast(ctypes.create_string_buffer(str.encode("")),ctypes.c_char_p)
    self.Trial = c_bool()
libc.MyLibVerInfo.argtypes = (ctypes.c_char_p,DSVerInfo,ctypes.POINTER(c_int))
err_no = ctypes.c_int()
Lic_ct = ctypes.create_string_buffer(str.encode(License_file))
VerInfo = DSVerInfo()
result = libc.DSpotterVerInfo(Lic_ct,VerInfo,err_no)
print("Result:\n",result.decode('utf-8'),"Error No:", err_no.value)
print("Version Size: ", sizeof(VerInfo))
print(VerInfo)  #Not really any use.. just an object until I can use VerInfo.x
Here is a sample of the output when it fails (from the print of the errorNo):
 Error No: 155394711
-155394711
Version Size:  48
<__main__.DSVerInfo object at 0x1093287c0>
Done
Segmentation fault: 11
f01898e9b5db0000:Test rpm$
Solution to Question:
From Mark's comment above the problem in the code is that I was not passing DSVerInfo as a pointer. Update the line calling the C funciton to the following and everything works as expected.
# Non-working code:
#libc.DSpotterVerInfo.argtypes = (ctypes.c_char_p,DSVerInfo,ctypes.POINTER(c_int))
#Working code (I had missed that I should be passsing a pointer to DSVerInfo)
libc.DSpotterVerInfo.argtypes = (ctypes.c_char_p,POINTER(DSVerInfo),ctypes.POINTER(c_int))

BOOLis typically defined asintin C (c_intorctypes.wintypes.BOOLin Python), but the problem is how is the function called correctly?