[CCC DEV] JNI - Native Calls to WinSparkle.dll

Dave Gilmore gilmorenator at gmail.com
Wed Jul 14 13:38:00 BST 2010


On 13 July 2010 22:46, cljacobsen at gmail.com <cljacobsen at gmail.com> wrote:
> Is WinSparkle.dll the code from the WinSparkle dudes? or your code?

It's my modified version of the WinSparkle Dudes Code that I checked
out from Git

> Currently I'm not sure that I quite understand the architecture of the
> JEditWinSparkle plugin, though I think that perhaps the 'private
> native void win_sparkle_init();' is actually a call into the actual
> WinSparkle.dll, which (I am quite sure) won't work.

Yup that's exactly what I was trying to do - whoops! I've changed this
now and done it correctly

> use the native interface you have Java on one side and want to call
> Native code on the other. To do that we must make a bridge between the
> two, as in:
>  Java Code -> Bridge (C++) -> WinSparkle.dll
> I'm not sure that is how you've set up things at the moment?

I missed out the whole bridge thing completely - so I obviously hadn't
implemented the native method correctly.

> If you look at the code for the macupdater you will see that it works
> similar to the example above, except on the mac one uses Objective C
> (.m files) and Frameworks instead of DLLs:
>  Java Code -> Bridge (ObjC) -> Sparkle.framework

Yup done that now and understood :-)

> Loading Inter-tube 1 with this guided email :)

Thanks

> No worries. Do try to have a look through the mac code and see if you
> can understand how it works though. The Windows code is really going
> to be very similar to that.

I do always try and have a good go before asking and use Google and
existing code as a guide,

I found a good resource at [1] that I've been working with,

I think the main issue here is me - I have relative little experience
in C or C++ (I'm learning more as I go though),

I reserve C and Assembler for my PIC programming adventures and the
Arduino of course,

So that makes the Implementation of the native method a bit of a
stumbling block for me,

And unlike the mac version I don't seem to be ab le to find anyone
else that has done this in windows yet :'(

The last thing I want is to waste anyone's time or cause frustration -
so perhaps someone else could implement the native method?

I'll keep having a go and see if I can do it I'm not one for giving up
easily I'll work my way through [1] but as far as I can tell the only
bit i'm missing is the implementation of the native call,

Time for Lunch and then I'll come back to it!

Cheers,

Dave

[1] http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html




More information about the developers mailing list