1

I am trying to make an android app for "Real Time Editing" on Playstation, and it depends on 2 libraries to function. One of which is coded in C# while the other is coded in Native C++. The C# lib use the Importdll function to make calls to the Native C++ code which in turn enacts with the PS3.

Example:

[DllImport("CCAPI.dll", EntryPoint="_ZN5CcApi13getDllVersionEv", CallingConvention=CallingConvention.Cdecl)]
    private static extern int getDllVersion();
    public int GetDllVersion()
    {
        return getDllVersion();
    }

The problem: The C++ library is not open source. And i don't think it's possible to use JNI to call methods within the C++ library without adding the java header. (Sorry if it sounds a little stupid, i'm literally DAY 1 new to JAVA).

I just was wondering if i can make a java version of PS3Lib (javaplugin) so it can work with CCAPI.dll.

C# Lib: PS3Lib.dll http://www.mediafire.com/download/chsvllkrmvb56vi/PS3Lib4.4.2.1.dll C++ Lib: CCAPI.dll http://www.mediafire.com/download/k5x3c1s6z26cuzt/CCAPI2.50.dll

Thanks, i appreciate anyone for even reading this. Any feedback would be greatly appreciated.

  • There isn't native support for the .net runtime on Android. You might be able to make it work by using tools from [Xamarin](http://xamarin.com/); but they're not free for comercial use, and I don't know if they allow running .net binaries or work by cross compiling C# code to java to run on Android. (In the latter case, they won't help.) – Dan Is Fiddling By Firelight Jun 30 '14 at 22:45
  • I actually made a Library for it in XAMARIN matter afact. :D But the thing is i can't develop in XAMARIN as not even the hello world APP works because it keeps forceclosing... :/ (i think its a .dll error.) @DanNeely – user3097400 Jun 30 '14 at 22:49
  • asking a new question about the Xamarin crashes might get you help there. I've never used it, so I can't provide any direct advice. – Dan Is Fiddling By Firelight Jun 30 '14 at 22:55

1 Answers1

0

Found the answer I needed. You have to use JNI (Java Native Interface) to wrap the C# library and call the C++ methods.

  • On a further note: https://github.com/Encapsulate/JRTE I used this implemented in this which I made open source. – user3097400 Oct 01 '15 at 08:15