phil65 / ibadatfile

Pythonic wrapper for IBA dat file DLL
MIT License
17 stars 9 forks source link

Update README.md #5

Closed MoPrince closed 1 month ago

MoPrince commented 1 month ago

I have updated the README to include important details about the requirement for a 32-bit version of Python due to the 32-bit nature of the Iba IbaFiles.dll. This update also provides a small guide to help with compatibility and smooth operation of the IbaDatFile wrapper on Windows systems.

phil65 commented 1 month ago

Are you sure that a 32bit python is strictly required? I´m not 100% sure but I think I used it with 64 bit python in the past.

MoPrince commented 1 month ago

Thank you Phil for getting back with me.

I thought the same thing. However, I did have issues with 64-bit python. It does not detect COM object. It indicates that "Class was not registered" when I can see it in the registry editor.

Here is the error code I get from multiple devices:

Traceback (most recent call last):
  File "C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\win32com\client\dynamic.py", line 86, in _GetGoodDispatch
    IDispatch = pythoncom.connect(IDispatch)
pywintypes.com_error: (-2147221021, 'Operation unavailable', None, None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\win32com\client\dynamic.py", line 134, in Dispatch
    IDispatch, userName = _GetGoodDispatchAndUserName(IDispatch, userName, clsctx)
  File "C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\win32com\client\dynamic.py", line 106, in _GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "C:\Users\AppData\Local\Programs\Python\Python39\lib\site-packages\win32com\client\dynamic.py", line 88, in _GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(
pywintypes.com_error: (-2147221164, 'Class not registered', None, None)
>>> import struct
>>>
>>> print(struct.calcsize("P") * 8)
64

However, on python 32-bit it accepts it:

>>> from win32com import client
>>> client.dynamic.Dispatch("IbaFilesLite.IbaFile")
<COMObject IbaFilesLite.IbaFile>
>>> import struct
>>>
>>> print(struct.calcsize("P") * 8)
32
phil65 commented 1 month ago

I just checked and IBA also offers a 64bit DLL, so they just have to match. Could you change text accordingy?

MoPrince commented 1 month ago

Yes you are right, ibaAnalyzer itself and their other products are 64-bit. However the ibaFiles dll is a 32-bit.

The ibaFiles dll indicates that it is 32-bit.

image

If it was PE d†, it would have been 64-bit.

Can you check if your ibaFilesLite dll is 64-bit?

QiangF commented 1 month ago

@MoPrince will our script work with the ibaFiles.dll only? Without all other iba stuff? I find someone has shared modified version of ibaFiles.dll online. Thank you!

MoPrince commented 1 month ago

@QiangF That is correct. You only need ibaFiles dll to read the dat files. You do not need any of the other applications or the "iba stuff".

phil65 commented 1 month ago

Yes you are right, ibaAnalyzer itself and their other products are 64-bit. However the ibaFiles dll is a 32-bit.

The ibaFiles dll indicates that it is 32-bit.

image

If it was PE d†, it would have been 64-bit.

Can you check if your ibaFilesLite dll is 64-bit?

I did.

MoPrince commented 1 month ago

Thanks. Updated.