@SevenOf9Sleeper rightly noticed, that the error message generated by subclasses of COMBindingBaseObject generate misleading messages - one offending place:
// This is line 128
} else {
hr = Ole32.INSTANCE.CoCreateInstance(clsid, null, dwClsContext,
IDispatch.IID_IDISPATCH, this.pDispatch);
}
if (COMUtils.FAILED(hr)) {
throw new COMException("COM object with ProgID '" + progId
+ "' and CLSID " + clsid.toGuidString()
+ " not registered properly!");
}
In the sample ComUtils#checkRC would have yielded:
com.sun.jna.platform.win32.COM.COMException: CoInitialize wurde nicht aufgerufen.(HRESULT: 800401f0) (puArgErr=)
English translation: "CoInitialize was not called" which would have pointed to the real problem instead of implying a registry problem.
@SevenOf9Sleeper rightly noticed, that the error message generated by subclasses of COMBindingBaseObject generate misleading messages - one offending place:
In the sample ComUtils#checkRC would have yielded:
com.sun.jna.platform.win32.COM.COMException: CoInitialize wurde nicht aufgerufen.(HRESULT: 800401f0) (puArgErr=)English translation: "CoInitialize was not called" which would have pointed to the real problem instead of implying a registry problem.