On 2/9/21, Doug Campbell <wdouglascampb...@hotmail.com> wrote: > > That was exactly what I needed. I will have to read up on the _pack_ > directive to understand it but for now things are running the way they > should be.
I'm glad I could help. Normally padding is added between fields of a struct in order to support aligned access for the data type of each field. Setting the `_pack_ = 1` attribute forces single-byte alignment, and thus no padding bytes are added. > I did have one typo in what I originally pasted that made its way into what > you provided. > > ('volumeID', ctypes.c_wchar * VOLUME_ID_SIZE), > > should actually be > > ('volumeID', ctypes.c_char * VOLUME_ID_SIZE), Sorry, I did actually scan over the fields to check the types against the C definition, but I somehow missed that extra "w". _______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32