jacob-project icon indicating copy to clipboard operation
jacob-project copied to clipboard

How to invoke non-dispatched member functions?

Open mkarg opened this issue 1 year ago • 4 comments

I need to invoke a COM server which only partially supports IDispatch. It works when calling from C++, but I wonder how to do the same in Java.

That COM-Server exposes a C-interface which extends C-IDispatch (so JACOB is actually able to find it by IID and expose it as Java-IDispatch), but some of its custom C-member-functions are not exposed as COM-IDs or COM-Names! 😢

A C++ client has no problem with this, as the C++ compiler directly uses the vtable to call those unexposed member functions.

But how can JACOB invoke those unexposed member functions? 🤔

mkarg avatar Jan 24 '24 13:01 mkarg

It can't. You'll have to write a bit of JNI yourself.

EJP286CRSKW avatar Feb 03 '24 04:02 EJP286CRSKW

That's really a pity. Are there plans to extend JACOB's functionality in this direction?

mkarg avatar Feb 03 '24 15:02 mkarg

Don't ask me, not my project. But I've been preparing some patches, well, rewrites, that I hope will become the next version. Fixing a million memory leaks, for example.

EJP


From: Markus KARG @.*** Sent: Sunday, 4 February 2024 2:04 AM To: freemansoft/jacob-project Cc: EJP286CRSKW; Comment Subject: Re: [freemansoft/jacob-project] How to invoke non-dispatched member functions? (Issue #52)

That's really a pity. Are there plans to extend JACOB's functionality in this direction?

Reply to this email directly, view <https://github.com/freemansoft/jacob-project/issues/52#issuecomment-192 5352105> it on GitHub, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AELOJ33Y5HWZH7KNXSEFC ELYRZGXLAVCNFSM6AAAAABCIXELASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTS MRVGM2TEMJQGU> . You are receiving this because you commented. <https://github.com/notifications/beacon/AELOJ364FR6D4HPMNXIR7O3YRZGXLA5 CNFSM6AAAAABCIXELASWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3T UL5UWJTTSYKFKS.gif> Message ID: @.***>

EJP286CRSKW avatar Feb 04 '24 01:02 EJP286CRSKW

PRs would be great!

freemansoft avatar Mar 18 '24 03:03 freemansoft