4 messages in net.java.dev.jna.usersRe: [jna-users] Calling methods/funct...
FromSent OnAttachments
Ian McDonaghOct 14, 2008 7:37 am 
Timothy WallOct 14, 2008 7:48 am 
Ian McDonaghOct 14, 2008 8:02 am 
Timothy WallOct 14, 2008 8:13 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Calling methods/functions on C++ classes, eg. IUnknownActions...
From:Timothy Wall (twal@dev.java.net)
Date:Oct 14, 2008 8:13:51 am
List:net.java.dev.jna.users

On Oct 14, 2008, at 11:03 AM, Ian McDonagh wrote:

Hi Timothy

Thanks for your feedback.

The problem is that you start using MAPI with calls like this:

MAPIInitialize(NULL); Pointer p = Pointer.createConstant(0); MAPILogonEx(p, ...); // gives you a pointer to an IMAPISession

NOTE: Java "null" translates to a NULL pointer automatically.

JNA works great for this.

I'm not sure that it's possible to do the above calls from com4j or jacob.

I'm sure they've got some method for making straight DLL calls, since you usually have to do so to initialize COM. I've never used either, though, so I don't know the details.

Any ideas?

----- Original Message ---- From: Timothy Wall <twal@dev.java.net> To: use@jna.dev.java.net Sent: Tuesday, 14 October, 2008 16:49:14 Subject: Re: [jna-users] Calling methods/functions on C++ classes, eg. IUnknown

See com4j or the JACOB project to access COM interfaces.

On Oct 14, 2008, at 10:38 AM, Ian McDonagh wrote:

Does JNA support calling functions on C++ classes?

I would like to call methods on an IUknown, eg. an IMAPISession (defined in Windows MAPI mapi32.dll).

Any help would be greatly appreciated.