Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception from COMBindingBaseObject swallows real reason + HRESULT #653

Conversation

matthiasblaesing
Copy link
Member

The exception thrown from COMBindingBaseObject when instatiation fails
is misleading:

COM object with CLSID {0002DF01-0000-0000-C000-000000000046} not registered properly!

In the concrete case COM was not properly initialized, the same error now
reports (in german locale):

CoInitialize wurde nicht aufgerufen.(HRESULT: 800401f0) (puArgErr=)

For english locale this should be along the lines of:

CoInitialize was not called.(HRESULT: 800401f0) (puArgErr=)

The message now points out the correct problem (as far as the windows
error code translation works) and the HRESULT can be used for a locale
independend report + search.

Closes #646

Please note: The change in COMBindingBaseObject looks worse in the diff, than it is. The two constructors (the clsid and the progid ones) were mostly duplicated code. The duplicate part was merged into the init method, and the constructors delegate to that method.

The exception thrown from COMBindingBaseObject when instatiation fails
is misleading:

COM object with CLSID {0002DF01-0000-0000-C000-000000000046} not registered properly!

In the concrete case COM was not properly initialized, the same error now
reports (in german locale):

CoInitialize wurde nicht aufgerufen.(HRESULT: 800401f0) (puArgErr=)

For english locale this should be along the lines of:

CoInitialize was not called.(HRESULT: 800401f0) (puArgErr=)

The message now points out the correct problem (as far as the windows
error code translation works) and the HRESULT can be used for a locale
independend report + search.

Closes java-native-access#646
@matthiasblaesing matthiasblaesing merged commit 9c63dc4 into java-native-access:master May 6, 2016
@matthiasblaesing matthiasblaesing deleted the combindingbaseobject_exceptionhandling branch May 6, 2016 14:48
mstyura pushed a commit to mstyura/jna that referenced this pull request Sep 9, 2024
Motivation:

We might have a lot of QuicheQuicChannel in memory so we should try to
keep the memory usage as low as possible.

Modifications:

Grow long[] for readable streams and writable streams dynamically

Result:

Less memory usage when not a lot of streams are active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant