I am currently researching .gr2 format and want to import granny2.dll in order to decompress the files, but i am having issues with implementing it python since every example i have managed to find was written in c++.
any help would be very much appreciated
for loading the DLL i tried 2 approaches using ctypes:
first:
Code: Select all
MyDllObject = ctypes.cdll.LoadLibrary("granny2.dll")
MyFunctionObject = MyDllObject._GrannyDecompressData@32
but this is an instant fail since it reads the function name up to "@" and stops so it never finds the wanted function
second:
Code: Select all
lib = ctypes.WinDLL("granny2.dll")
func = lib['_GrannyDecompressData@32']
value = func(section.compression,0,section.data_size,ComperesedData,section.first16bit,section.first8bit,section.decompressed_size,DecompressedData)
Thanks in advance