2015-07-05 38 views
0
[DllImport(@"CeSmLm.dll", CallingConvention = CallingConvention.Cdecl)] 

private static extern UInt32 CePrnGetTotPaperRemainingUsb(
        int intDev, 
        ref UInt32 dwNumCmPaper, 
        ref UInt32 dwSysErr); 

這是C#類中的方法,我想在Java類中調用它。有可能稱之爲?如何從Java中調用C#類中的C#方法?

+0

看一看希望這是幫助全給你的HTTP ://www.codeproject.com/Articles/13093/C-method-calls-within-a-Java-program – SSH

+1

它實際上是一個本機DLL的導入,所以你真的想調用它,而不是任何C#方法。 –

+0

是的,其實我想導入一個用Java語言編寫的DLL文件。但是我使用System.loadLibrary(「」); 我也無法調用Dll文件中的方法。 – MIke

回答