├── FastIPC_J ├── .gitignore ├── src │ └── org │ │ └── fastipc │ │ ├── FastIPCClient.java │ │ ├── FastIPCNative.java │ │ ├── FastIPCServer.java │ │ ├── FastIPCException.java │ │ └── FastIPCReadListener.java ├── .classpath ├── .project └── .settings │ └── org.eclipse.jdt.core.prefs ├── FastIPC_J_Test ├── .gitignore ├── src │ └── org │ │ └── fastipc │ │ └── TestFastIPCServer.java ├── .classpath ├── .project └── .settings │ └── org.eclipse.jdt.core.prefs ├── Debug ├── FastIPC.dll ├── readme.txt ├── FastIPC_JNI.dll ├── TestFastIPCClient.exe ├── TestFastIPCServer.exe └── .gitignore ├── FastIPC ├── Debug │ └── .gitignore ├── Release │ └── .gitignore ├── FastIPC.vcxproj.user ├── FastIPC.vcxproj.filters └── FastIPC.vcxproj ├── Release ├── FastIPC.dll ├── readme.txt ├── FastIPC_JNI.dll ├── TestFastIPCClient.exe ├── TestFastIPCServer.exe └── .gitignore ├── common ├── test │ ├── ipccom.h │ ├── ipccom.cpp │ └── wincomm.cpp ├── util │ ├── StrUtil.h │ └── StrUtil.cpp └── fastipc │ ├── Client.cpp │ ├── Client.h │ ├── FastIPC.h │ ├── Server.cpp │ ├── Server.h │ └── FastIPC.cpp ├── FastIPC_CSharp ├── Release │ └── .gitignore ├── fastipc_4csharp.h ├── fastipc_4csharp.cpp ├── FastIPC_CSharp.vcxproj.filters ├── FastIPC_CSharp.vcxproj.user └── FastIPC_CSharp.vcxproj ├── FastIPC_CSharp_Lib ├── bin │ └── .gitignore ├── obj │ └── .gitignore ├── Properties │ └── AssemblyInfo.cs ├── fastipc │ ├── FastIPCClient.cs │ ├── FastIPCServer.cs │ ├── FastIPCException.cs │ ├── FastIPCReadListener.cs │ └── FastIPCNative.cs └── FastIPC_CSharp_Lib.csproj ├── FastIPC_JNI ├── Debug │ └── .gitignore ├── Release │ └── .gitignore ├── javautils.h ├── FastIPC_JNI.cpp ├── org_fastipc_FastIPCNative.h ├── javautils.cpp ├── jni_jdk1_6_24 │ ├── jni_md.h │ └── jni.h ├── FastIPC_JNI.vcxproj.filters └── FastIPC_JNI.vcxproj ├── FastIPC_CSharp_Demo ├── bin │ └── .gitignore ├── obj │ └── .gitignore ├── Form1.cs ├── Program.cs ├── InputBox.cs ├── Form1.Designer.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Settings.Designer.cs │ ├── Settings.settings │ └── Resources.resx ├── App.config ├── FastIPC_CSharp_Demo.csproj.user ├── FastIPC_CSharp_Demo.csproj └── Form1.resx ├── TestFastIPCClient ├── Debug │ └── .gitignore ├── Release │ └── .gitignore ├── TestFastIPCClient.cpp ├── TestFastIPCClient.vcxproj.filters └── TestFastIPCClient.vcxproj ├── TestFastIPCServer ├── Debug │ └── .gitignore ├── Release │ └── .gitignore ├── TestFastIPCServer.cpp ├── TestFastIPCServer.vcxproj.filters └── TestFastIPCServer.vcxproj ├── README.md ├── .gitignore └── FastIPC.sln /FastIPC_J/.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | -------------------------------------------------------------------------------- /FastIPC_J_Test/.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | -------------------------------------------------------------------------------- /Debug/FastIPC.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/Debug/FastIPC.dll -------------------------------------------------------------------------------- /Debug/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/Debug/readme.txt -------------------------------------------------------------------------------- /FastIPC/Debug/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | * 3 | !.gitignore 4 | !readme.txt -------------------------------------------------------------------------------- /FastIPC/Release/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | * 3 | !.gitignore 4 | !readme.txt -------------------------------------------------------------------------------- /Release/FastIPC.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/Release/FastIPC.dll -------------------------------------------------------------------------------- /Release/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/Release/readme.txt -------------------------------------------------------------------------------- /common/test/ipccom.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/common/test/ipccom.h -------------------------------------------------------------------------------- /Debug/FastIPC_JNI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/Debug/FastIPC_JNI.dll -------------------------------------------------------------------------------- /FastIPC_CSharp/Release/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | * 3 | !.gitignore 4 | !readme.txt -------------------------------------------------------------------------------- /FastIPC_CSharp_Lib/bin/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | * 3 | !.gitignore 4 | !readme.txt -------------------------------------------------------------------------------- /FastIPC_CSharp_Lib/obj/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | * 3 | !.gitignore 4 | !readme.txt -------------------------------------------------------------------------------- /FastIPC_JNI/Debug/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | * 3 | !.gitignore 4 | !readme.txt -------------------------------------------------------------------------------- /FastIPC_JNI/Release/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | * 3 | !.gitignore 4 | !readme.txt -------------------------------------------------------------------------------- /common/test/ipccom.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/common/test/ipccom.cpp -------------------------------------------------------------------------------- /common/util/StrUtil.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/common/util/StrUtil.h -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/bin/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | * 3 | !.gitignore 4 | !readme.txt -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/obj/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | * 3 | !.gitignore 4 | !readme.txt -------------------------------------------------------------------------------- /FastIPC_JNI/javautils.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_JNI/javautils.h -------------------------------------------------------------------------------- /Release/FastIPC_JNI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/Release/FastIPC_JNI.dll -------------------------------------------------------------------------------- /TestFastIPCClient/Debug/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | * 3 | !.gitignore 4 | !readme.txt -------------------------------------------------------------------------------- /TestFastIPCClient/Release/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | * 3 | !.gitignore 4 | !readme.txt -------------------------------------------------------------------------------- /TestFastIPCServer/Debug/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | * 3 | !.gitignore 4 | !readme.txt -------------------------------------------------------------------------------- /TestFastIPCServer/Release/.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | * 3 | !.gitignore 4 | !readme.txt -------------------------------------------------------------------------------- /common/fastipc/Client.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/common/fastipc/Client.cpp -------------------------------------------------------------------------------- /common/fastipc/Client.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/common/fastipc/Client.h -------------------------------------------------------------------------------- /common/fastipc/FastIPC.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/common/fastipc/FastIPC.h -------------------------------------------------------------------------------- /common/fastipc/Server.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/common/fastipc/Server.cpp -------------------------------------------------------------------------------- /common/fastipc/Server.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/common/fastipc/Server.h -------------------------------------------------------------------------------- /common/test/wincomm.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/common/test/wincomm.cpp -------------------------------------------------------------------------------- /common/util/StrUtil.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/common/util/StrUtil.cpp -------------------------------------------------------------------------------- /Debug/TestFastIPCClient.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/Debug/TestFastIPCClient.exe -------------------------------------------------------------------------------- /Debug/TestFastIPCServer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/Debug/TestFastIPCServer.exe -------------------------------------------------------------------------------- /FastIPC_JNI/FastIPC_JNI.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_JNI/FastIPC_JNI.cpp -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/Form1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_CSharp_Demo/Form1.cs -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/Program.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_CSharp_Demo/Program.cs -------------------------------------------------------------------------------- /Release/TestFastIPCClient.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/Release/TestFastIPCClient.exe -------------------------------------------------------------------------------- /Release/TestFastIPCServer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/Release/TestFastIPCServer.exe -------------------------------------------------------------------------------- /FastIPC_CSharp/fastipc_4csharp.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_CSharp/fastipc_4csharp.h -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/InputBox.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_CSharp_Demo/InputBox.cs -------------------------------------------------------------------------------- /FastIPC_CSharp/fastipc_4csharp.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_CSharp/fastipc_4csharp.cpp -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/Form1.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_CSharp_Demo/Form1.Designer.cs -------------------------------------------------------------------------------- /FastIPC_JNI/org_fastipc_FastIPCNative.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_JNI/org_fastipc_FastIPCNative.h -------------------------------------------------------------------------------- /TestFastIPCClient/TestFastIPCClient.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/TestFastIPCClient/TestFastIPCClient.cpp -------------------------------------------------------------------------------- /TestFastIPCServer/TestFastIPCServer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/TestFastIPCServer/TestFastIPCServer.cpp -------------------------------------------------------------------------------- /FastIPC_CSharp_Lib/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_CSharp_Lib/Properties/AssemblyInfo.cs -------------------------------------------------------------------------------- /FastIPC_CSharp_Lib/fastipc/FastIPCClient.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_CSharp_Lib/fastipc/FastIPCClient.cs -------------------------------------------------------------------------------- /FastIPC_CSharp_Lib/fastipc/FastIPCServer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_CSharp_Lib/fastipc/FastIPCServer.cs -------------------------------------------------------------------------------- /FastIPC_J/src/org/fastipc/FastIPCClient.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_J/src/org/fastipc/FastIPCClient.java -------------------------------------------------------------------------------- /FastIPC_J/src/org/fastipc/FastIPCNative.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_J/src/org/fastipc/FastIPCNative.java -------------------------------------------------------------------------------- /FastIPC_J/src/org/fastipc/FastIPCServer.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_J/src/org/fastipc/FastIPCServer.java -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_CSharp_Demo/Properties/AssemblyInfo.cs -------------------------------------------------------------------------------- /FastIPC_CSharp_Lib/fastipc/FastIPCException.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_CSharp_Lib/fastipc/FastIPCException.cs -------------------------------------------------------------------------------- /FastIPC_J/src/org/fastipc/FastIPCException.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_J/src/org/fastipc/FastIPCException.java -------------------------------------------------------------------------------- /FastIPC_J/src/org/fastipc/FastIPCReadListener.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_J/src/org/fastipc/FastIPCReadListener.java -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_CSharp_Demo/Properties/Resources.Designer.cs -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_CSharp_Demo/Properties/Settings.Designer.cs -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # fastipc 2 | 在Windows下基于共享内存实现进程间通信。 3 | 具体使用请参见wiki:https://github.com/washheart/fastipc/wiki 4 | 使用时可以直接使用生成的fastipc.dll,也可以以源码方式使用,无任何限制。 5 | -------------------------------------------------------------------------------- /FastIPC_J_Test/src/org/fastipc/TestFastIPCServer.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washheart/fastipc/HEAD/FastIPC_J_Test/src/org/fastipc/TestFastIPCServer.java -------------------------------------------------------------------------------- /Debug/.gitignore: -------------------------------------------------------------------------------- 1 | # ingnore all files 2 | * 3 | !.gitignore 4 | #!FastIPC.dll 5 | #!FastIPC_JNI.dll 6 | #!TestFastIPCClient.exe 7 | #!TestFastIPCServer.exe 8 | !readme.txt 9 | -------------------------------------------------------------------------------- /Release/.gitignore: -------------------------------------------------------------------------------- 1 | # ingnore all files 2 | * 3 | !.gitignore 4 | #!FastIPC.dll 5 | #!FastIPC_JNI.dll 6 | #!TestFastIPCClient.exe 7 | #!TestFastIPCServer.exe 8 | !readme.txt 9 | -------------------------------------------------------------------------------- /FastIPC/FastIPC.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /FastIPC_J/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ingnore all files 2 | !.gitignore 3 | ~* 4 | *.suo 5 | *.sdf 6 | *.opensdf 7 | comctl32.pdb/B7EB53F3F66D4DC0991440686284EE432/download.error 8 | urlmon.pdb/062A8355CBC34DA2B98FE3BA70276CA52/download.error 9 | shell32.pdb/F083F3A502F040F4B5282EEC47CBF79A2/download.error 10 | gdiplus.pdb/4EBBAFE8BC014DF48A3B61FEBB1FC5912/download.error -------------------------------------------------------------------------------- /FastIPC_J_Test/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FastIPC_CSharp/FastIPC_CSharp.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /FastIPC_J/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | FastIPC_J 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /FastIPC_J_Test/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | FastIPC_J_Test 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /FastIPC_JNI/javautils.cpp: -------------------------------------------------------------------------------- 1 | #include "javautils.h" 2 | 3 | //std::string jstring2string(JNIEnv * env, jstring jstr){ 4 | // const char * tmp = env->GetStringUTFChars(jstr, false); 5 | // string js(tmp); 6 | // env->ReleaseStringUTFChars(jstr, tmp); 7 | // return js; 8 | //} 9 | std::wstring jstring2wstring(JNIEnv * env, jstring jstr){ 10 | const char * tmp = env->GetStringUTFChars(jstr, false); 11 | string js(tmp); 12 | env->ReleaseStringUTFChars(jstr, tmp); 13 | return jw::s2w(js); 14 | } 15 | -------------------------------------------------------------------------------- /FastIPC_JNI/jni_jdk1_6_24/jni_md.h: -------------------------------------------------------------------------------- 1 | /* 2 | * %W% %E% 3 | * 4 | * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. 5 | * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 | */ 7 | 8 | #ifndef _JAVASOFT_JNI_MD_H_ 9 | #define _JAVASOFT_JNI_MD_H_ 10 | 11 | #define JNIEXPORT __declspec(dllexport) 12 | #define JNIIMPORT __declspec(dllimport) 13 | #define JNICALL __stdcall 14 | 15 | typedef long jint; 16 | typedef __int64 jlong; 17 | typedef signed char jbyte; 18 | 19 | #endif /* !_JAVASOFT_JNI_MD_H_ */ 20 | -------------------------------------------------------------------------------- /common/fastipc/FastIPC.cpp: -------------------------------------------------------------------------------- 1 | #include "FastIPC.h" 2 | #include "common/util/StrUtil.h" 3 | 4 | namespace fastipc{ 5 | std::wstring genServerName(){ 6 | return jw::GenerateGuidW(); 7 | } 8 | std::wstring genServerName(const std::wstring servername){ 9 | return servername + L"_c"; 10 | } 11 | std::wstring genWritedEventName(const std::wstring servername){ 12 | return servername + L"_w"; 13 | } 14 | std::wstring genReadedEventName(const std::wstring servername){ 15 | return servername + L"_r"; 16 | } 17 | std::wstring genMappingFileName(const std::wstring servername){ 18 | return servername + L"_m"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /FastIPC_J/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.6 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.6 12 | -------------------------------------------------------------------------------- /FastIPC_J_Test/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.6 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.6 12 | -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/FastIPC_CSharp_Demo.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 发布\ 5 | 6 | 7 | 8 | 9 | 10 | zh-CN 11 | false 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /FastIPC_CSharp/FastIPC_CSharp.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(SolutionDir)\FastIPC_CSharp_Demo\bin\$(Configuration)\ 5 | WindowsLocalDebugger 6 | FastIPC_CSharp_Demo.exe 7 | false 8 | 9 | 10 | $(SolutionDir)..\demos 11 | WindowsLocalDebugger 12 | $(SolutionDir)..\demos\run_WithinSwing.bat 13 | false 14 | 15 | -------------------------------------------------------------------------------- /FastIPC_JNI/FastIPC_JNI.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | jniex 7 | 8 | 9 | 10 | 11 | {91c878c8-c485-4f33-8e06-0c7acfd9515a} 12 | 13 | 14 | {187a0c20-af92-46bc-b3d5-e100aa4431dc} 15 | 16 | 17 | 18 | 19 | 20 | jni_jdk1_6_24 21 | 22 | 23 | jni_jdk1_6_24 24 | 25 | 26 | jniex 27 | 28 | 29 | -------------------------------------------------------------------------------- /FastIPC/FastIPC.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {813edc5a-1c15-4613-aced-05d138c51554} 6 | 7 | 8 | {ee3e81de-dea2-434f-b7a7-3fcc9b51a598} 9 | 10 | 11 | {60a3ad7d-5b60-49a0-94a1-7bf51bdff852} 12 | 13 | 14 | 15 | 16 | common\fastipc 17 | 18 | 19 | common\fastipc 20 | 21 | 22 | common\fastipc 23 | 24 | 25 | common\util 26 | 27 | 28 | 29 | 30 | common\fastipc 31 | 32 | 33 | common\fastipc 34 | 35 | 36 | common\fastipc 37 | 38 | 39 | common\util 40 | 41 | 42 | -------------------------------------------------------------------------------- /TestFastIPCClient/TestFastIPCClient.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {e80a40d8-7f0e-45eb-bd27-8e7302a816c5} 6 | 7 | 8 | {ff7a844e-2eba-4dc2-8ae5-4e9418274358} 9 | 10 | 11 | {c947ae62-2bef-41bf-bb8a-ab31cd2af1d5} 12 | 13 | 14 | {0a9cd8f8-6875-4cfa-be89-c55d00c29261} 15 | 16 | 17 | 18 | 19 | 20 | common\test 21 | 22 | 23 | common\test 24 | 25 | 26 | 27 | 28 | common\fastipc 29 | 30 | 31 | common\fastipc 32 | 33 | 34 | common\fastipc 35 | 36 | 37 | common\util 38 | 39 | 40 | common\test 41 | 42 | 43 | -------------------------------------------------------------------------------- /TestFastIPCServer/TestFastIPCServer.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {fbd97599-fae2-4360-946d-ded6915e83bd} 6 | 7 | 8 | {f0da27c6-131d-418e-9c0a-ca83f0b193ec} 9 | 10 | 11 | {3a172c0e-92f8-4501-91ab-a1b9baab4c8b} 12 | 13 | 14 | {95b964a1-621b-4808-85f3-c26174a6487c} 15 | 16 | 17 | 18 | 19 | 20 | common\test 21 | 22 | 23 | common\test 24 | 25 | 26 | 27 | 28 | common\fastipc 29 | 30 | 31 | common\fastipc 32 | 33 | 34 | common\fastipc 35 | 36 | 37 | common\util 38 | 39 | 40 | common\test 41 | 42 | 43 | -------------------------------------------------------------------------------- /FastIPC_CSharp_Lib/fastipc/FastIPCReadListener.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace org { 8 | namespace fastipc { 9 | /** 10 | * 服务端侦听器,当客户端有数据写入时,会触发。
11 | * 源码:https://github.com/washheart/fastipc
12 | * 源码:http://git.oschina.net/washheart/fastipc
13 | * 说明:https://github.com/washheart/fastipc/wiki
14 | * 15 | * @author washheart@163.com 16 | */ 17 | public interface FastIPCReadListener { 18 | /** 19 | * 当FastIPC服务端成功接收客户端写入的数据后,会回调此方法 20 | * 21 | * @param msgType 22 | * 消息的类型,参见FastIPCNative.MSG_TYPE_* 23 | * @param packId 24 | * 当消息是被拆分消息时(msgType!=MSG_TYPE_NORMAL),用于将多个消息组织在一起 25 | * @param data 26 | * 传递的消息具体内容,注意消息可能是分段的,此时需要根据packId进行组装 27 | */ 28 | void OnRead(int msgType, IntPtr packId, IntPtr data, int dataLen); 29 | }// End FastIPCReadListener class 30 | 31 | // 提供一个完成了分段数据组装的抽象类,对不是太大的数据免除自己用流组织数据的麻烦 32 | public abstract class RebuildedBlockListener : org.fastipc.FastIPCReadListener { 33 | private Dictionary caches = new Dictionary(); 34 | 35 | public abstract void OnRead(String data); 36 | 37 | public void OnRead(int msgType, IntPtr _packId, IntPtr data, int dataLen) { 38 | string packId = FastIPCNative.ptr2string(_packId); 39 | if (msgType == FastIPCNative.MSG_TYPE_NORMAL) { 40 | OnRead(FastIPCNative.ptr2string(data, dataLen)); 41 | } else { 42 | Stream bos = null; 43 | if (caches.ContainsKey(packId)) { 44 | bos = caches[packId]; 45 | } else { 46 | bos = new MemoryStream(); 47 | caches.Add(packId, bos); 48 | } 49 | FastIPCNative.readPtr(bos, data, dataLen); 50 | if (msgType == FastIPCNative.MSG_TYPE_END) { 51 | caches.Remove(packId); 52 | byte[] bytes = new byte[bos.Length]; 53 | bos.Position = 0; // 设置当前流的位置为流的开始 54 | bos.Read(bytes, 0, bytes.Length); 55 | string rtn = Encoding.UTF8.GetString(bytes); 56 | OnRead(rtn); 57 | } 58 | } 59 | } 60 | }// End RebuildedBlockListener class 61 | }// End fastipc namespace 62 | }// End org namespace -------------------------------------------------------------------------------- /FastIPC_CSharp_Lib/FastIPC_CSharp_Lib.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90} 8 | Library 9 | Properties 10 | org.fastipc 11 | FastIPC_CSharp_Lib 12 | v4.0 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | true 33 | x86 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | copy $(TargetPath) $(SolutionDir)\FastIPC_CSharp_Demo\bin\$(Configuration)\$(ProjectName).dll /Y 57 | 58 | 65 | -------------------------------------------------------------------------------- /FastIPC_JNI/FastIPC_JNI.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {759C69A5-2A94-48FF-B227-4C084A493C0C} 15 | Win32Proj 16 | FastIPC_JNI 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120_xp 23 | Unicode 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120 29 | true 30 | Unicode 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | 45 | 46 | false 47 | 48 | 49 | 50 | 51 | 52 | Level3 53 | Disabled 54 | WIN32;_DEBUG;_WINDOWS;_USRDLL;FASTIPC_JNI_EXPORTS;%(PreprocessorDefinitions) 55 | true 56 | $(SolutionDir);%(AdditionalIncludeDirectories) 57 | 58 | 59 | Windows 60 | true 61 | 62 | 63 | 64 | 65 | Level3 66 | 67 | 68 | MaxSpeed 69 | true 70 | true 71 | WIN32;NDEBUG;_WINDOWS;_USRDLL;FASTIPC_JNI_EXPORTS;%(PreprocessorDefinitions) 72 | true 73 | $(SolutionDir);%(AdditionalIncludeDirectories) 74 | 75 | 76 | Windows 77 | true 78 | true 79 | true 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | {6bd8e842-723a-47ba-83a4-fa357465dc13} 95 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /FastIPC/FastIPC.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {6BD8E842-723A-47BA-83A4-FA357465DC13} 15 | Win32Proj 16 | FastIPC 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120 23 | Unicode 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120 29 | true 30 | Unicode 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | 45 | 46 | false 47 | 48 | 49 | 50 | 51 | 52 | Level3 53 | Disabled 54 | WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_USRDLL;FASTIPC_EXPORTS;%(PreprocessorDefinitions) 55 | true 56 | $(SolutionDir);%(AdditionalIncludeDirectories) 57 | 58 | 59 | Windows 60 | true 61 | 62 | 63 | 64 | 65 | Level3 66 | 67 | 68 | MaxSpeed 69 | true 70 | true 71 | WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_USRDLL;FASTIPC_EXPORTS;%(PreprocessorDefinitions) 72 | true 73 | $(SolutionDir);%(AdditionalIncludeDirectories) 74 | 75 | 76 | Windows 77 | true 78 | true 79 | true 80 | 81 | 82 | copy $(TargetPath) $(SolutionDir)\FastIPC_CSharp_Demo\bin\$(Configuration)\$(ProjectName).dll /Y 83 | copy $(TargetPath) $(SolutionDir)\FastIPC_CSharp_Lib\bin\$(Configuration)\$(ProjectName).dll /Y 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /FastIPC_CSharp/FastIPC_CSharp.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D} 15 | Win32Proj 16 | FastIPC_CSharp 17 | FastIPC_CSharp 18 | 19 | 20 | 21 | DynamicLibrary 22 | true 23 | v120_xp 24 | Unicode 25 | 26 | 27 | DynamicLibrary 28 | false 29 | v120_xp 30 | true 31 | Unicode 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | true 45 | 46 | 47 | false 48 | 49 | 50 | 51 | 52 | 53 | Level3 54 | Disabled 55 | WIN32;_DEBUG;_WINDOWS;_USRDLL;FASTIPC_JNI_EXPORTS;%(PreprocessorDefinitions) 56 | true 57 | $(SolutionDir);%(AdditionalIncludeDirectories) 58 | 59 | 60 | Windows 61 | true 62 | 63 | 64 | 65 | 66 | Level3 67 | 68 | 69 | MaxSpeed 70 | true 71 | true 72 | WIN32;NDEBUG;_WINDOWS;_USRDLL;FASTIPC_JNI_EXPORTS;%(PreprocessorDefinitions) 73 | true 74 | $(SolutionDir);%(AdditionalIncludeDirectories) 75 | MultiThreaded 76 | 77 | 78 | Windows 79 | true 80 | true 81 | true 82 | 83 | 84 | copy $(TargetPath) $(SolutionDir)\FastIPC_CSharp_Demo\bin\$(Configuration)\$(ProjectName).dll /Y 85 | copy $(TargetPath) $(SolutionDir)\FastIPC_CSharp_Lib\bin\$(Configuration)\$(ProjectName).dll /Y 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | {6bd8e842-723a-47ba-83a4-fa357465dc13} 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /TestFastIPCServer/TestFastIPCServer.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {930A4E3B-214C-4017-B3EC-FA5733082B17} 15 | Win32Proj 16 | Server1 17 | TestFastIPCServer 18 | 19 | 20 | 21 | Application 22 | true 23 | v120_xp 24 | Unicode 25 | 26 | 27 | Application 28 | false 29 | v120 30 | true 31 | Unicode 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | true 45 | 46 | 47 | false 48 | 49 | 50 | 51 | 52 | 53 | Level3 54 | Disabled 55 | _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;_LIB;%(PreprocessorDefinitions) 56 | $(SolutionDir);%(AdditionalIncludeDirectories) 57 | 58 | 59 | Windows 60 | true 61 | 62 | 63 | 64 | 65 | 66 | 67 | Level3 68 | 69 | 70 | MaxSpeed 71 | true 72 | true 73 | WIN32;NDEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 74 | $(SolutionDir);%(AdditionalIncludeDirectories) 75 | 76 | 77 | Windows 78 | true 79 | true 80 | true 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | {6bd8e842-723a-47ba-83a4-fa357465dc13} 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /TestFastIPCClient/TestFastIPCClient.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {B948DDC6-937F-4DF0-8960-DD77B678B67E} 15 | Win32Proj 16 | Client1 17 | TestFastIPCClient 18 | 19 | 20 | 21 | Application 22 | true 23 | v120_xp 24 | Unicode 25 | 26 | 27 | Application 28 | false 29 | v120 30 | true 31 | Unicode 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | true 45 | 46 | 47 | false 48 | 49 | 50 | 51 | 52 | 53 | Level3 54 | Disabled 55 | _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 56 | true 57 | $(SolutionDir);%(AdditionalIncludeDirectories) 58 | 59 | 60 | Windows 61 | true 62 | 63 | 64 | 65 | 66 | 67 | 68 | Level3 69 | 70 | 71 | MaxSpeed 72 | true 73 | true 74 | WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 75 | true 76 | $(SolutionDir);%(AdditionalIncludeDirectories) 77 | 78 | 79 | Windows 80 | true 81 | true 82 | true 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | {6bd8e842-723a-47ba-83a4-fa357465dc13} 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/FastIPC_CSharp_Demo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D} 8 | WinExe 9 | Properties 10 | FastIPC_CSharp_Demo 11 | FastIPC_CSharp_Demo 12 | v4.0 13 | 512 14 | 15 | false 16 | 发布\ 17 | true 18 | Disk 19 | false 20 | Foreground 21 | 7 22 | Days 23 | false 24 | false 25 | true 26 | 0 27 | 1.0.0.%2a 28 | false 29 | true 30 | 31 | 32 | AnyCPU 33 | true 34 | full 35 | false 36 | bin\Debug\ 37 | DEBUG;TRACE 38 | prompt 39 | 4 40 | 41 | 42 | AnyCPU 43 | pdbonly 44 | true 45 | bin\Release\ 46 | TRACE 47 | prompt 48 | 4 49 | false 50 | 51 | 52 | true 53 | 54 | 55 | bin\发布版本\ 56 | TRACE 57 | true 58 | pdbonly 59 | AnyCPU 60 | prompt 61 | MinimumRecommendedRules.ruleset 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | Form 78 | 79 | 80 | Form 81 | 82 | 83 | Form1.cs 84 | 85 | 86 | 87 | 88 | Form1.cs 89 | 90 | 91 | ResXFileCodeGenerator 92 | Resources.Designer.cs 93 | Designer 94 | 95 | 96 | True 97 | Resources.resx 98 | True 99 | 100 | 101 | SettingsSingleFileGenerator 102 | Settings.Designer.cs 103 | 104 | 105 | True 106 | Settings.settings 107 | True 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | {4e55fa19-3bab-4229-8819-9ea7873a5e90} 116 | JWebTop_CSharp_Lib 117 | 118 | 119 | 120 | 121 | False 122 | Microsoft .NET Framework 4 %28x86 和 x64%29 123 | true 124 | 125 | 126 | False 127 | .NET Framework 3.5 SP1 Client Profile 128 | false 129 | 130 | 131 | False 132 | .NET Framework 3.5 SP1 133 | false 134 | 135 | 136 | False 137 | Windows Installer 4.5 138 | true 139 | 140 | 141 | 142 | 143 | 144 | 145 | 152 | -------------------------------------------------------------------------------- /FastIPC_CSharp_Lib/fastipc/FastIPCNative.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices; 6 | using System.Text; 7 | 8 | namespace org { 9 | namespace fastipc { 10 | /** 11 | * FastIPC的native方法定义。
12 | * 源码:https://github.com/washheart/fastipc
13 | * 源码:http://git.oschina.net/washheart/fastipc
14 | * 说明:https://github.com/washheart/fastipc/wiki
15 | * 16 | * @author washheart@163.com 17 | */ 18 | public class FastIPCNative { 19 | public static int // 定义消息类型常量 20 | MSG_TYPE_NORMAL = 0, // 正常的消息 21 | MSG_TYPE_PART = 1,// 此消息是一完整数据的一部分 22 | MSG_TYPE_END = 2; // 此消息是一完整数据的结尾 23 | 24 | private static int// 25 | // ERR_ServerCreate = 100, // 服务器创建失败 26 | // ERR_ClientCreate = 101, // 客户端创建失败 27 | // ERR_EventCreate_W = 201, // 服务器创建写事件失败 28 | // ERR_EventCreate_R = 202, // 服务器创建读事件失败 29 | // ERR_EventOpen_W = 203, // 客户端打开写事件失败 30 | // ERR_EventOpen_R = 204, // 客户端打开读事件失败 31 | // ERR_EventWait_W = 205,// 客户端等待可写事件失败 32 | // ERR_EventWait_R = 206, // 服务器等待可读事件失败 33 | // ERR_MappingCreate = 301,// 服务器创建映射文件失败 34 | // ERR_MappingOpen = 302, // 服客户端打开映射文件失败 35 | // ERR_MappingMap = 303, // 服务器/客户端映射内存文件失败 36 | ERR_ServerName = 1, // 客户端创建失败 37 | ERR_NONE = 0;// 没有任何错误 38 | 39 | [DllImport("FastIPC_CSharp.dll", CharSet = CharSet.Unicode)] 40 | private extern static int nCreateServer([MarshalAs(UnmanagedType.LPTStr)]string serverName, int blockSize, ref int result); 41 | 42 | // DLL回调CSharp回调函数原型 43 | private delegate void CSharpCallBack(int msgType, IntPtr packId, IntPtr data, int dataLen); 44 | [DllImport("FastIPC_CSharp.dll", CharSet = CharSet.Unicode)] 45 | private extern static void nStartRead(int nativeServer, CSharpCallBack listener); 46 | 47 | [DllImport("FastIPC_CSharp.dll", CharSet = CharSet.Unicode)] 48 | private extern static void nCloseServer(int nativeServer); 49 | 50 | [DllImport("FastIPC_CSharp.dll", CharSet = CharSet.Unicode)] 51 | private extern static int nCreateClient(String serverName, int blockSize, ref int result); 52 | 53 | [DllImport("FastIPC_CSharp.dll", CharSet = CharSet.Unicode)] 54 | private extern static int nWriteClient(int nativeClient, String data); 55 | 56 | [DllImport("FastIPC_CSharp.dll", CharSet = CharSet.Unicode)] 57 | private extern static void nCloseClient(int nativeClient); 58 | 59 | // 创建服务器 60 | public static int createServer(String serverName, int blockSize) { 61 | FastIPCNative.checkServerName(serverName); 62 | int result = -1; 63 | int objectPtr = FastIPCNative.nCreateServer(serverName, blockSize, ref result); 64 | if (result != FastIPCNative.ERR_NONE) { 65 | throw new FastIPCException("创建服务端失败(" + result + ")!"); 66 | } 67 | return objectPtr; 68 | } 69 | 70 | // 开始服务端的侦听,此方法会阻塞当前线程,所以一般应该在新线程中调用 71 | public static void startRead(int nativeServer, FastIPCReadListener listener) { 72 | nStartRead(nativeServer, listener.OnRead); 73 | } 74 | 75 | // 关闭服务器 76 | public static void closeServer(int nativeServer) { 77 | FastIPCNative.nCloseServer(nativeServer); 78 | } 79 | 80 | // 创建客户端 81 | public static int createClient(String serverName, int blockSize) { 82 | FastIPCNative.checkServerName(serverName); 83 | int result = -1; 84 | int objectPtr = FastIPCNative.nCreateClient(serverName, blockSize, ref result); 85 | if (result != FastIPCNative.ERR_NONE) { 86 | throw new FastIPCException("创建客户端失败(" + result + ")!"); 87 | } 88 | return objectPtr; 89 | } 90 | 91 | // 写数据到服务端 92 | public static void write(int nativeClient, String data) { 93 | nWriteClient(nativeClient, data); 94 | } 95 | 96 | // 关闭客户端 97 | public static void closeClient(int nativeClient) { 98 | nCloseClient(nativeClient); 99 | } 100 | 101 | // 创建一个服务器名称 102 | public static String genServerName() { 103 | return System.Guid.NewGuid().ToString(); 104 | } 105 | 106 | // 创建客户端的服务器和服务端的客户端时(即客户端需要开启一个监听的服务端时)需要此方法生成客户端的服务器名称 107 | public static String genServerName(String serverName) { 108 | return serverName + "_c"; 109 | } 110 | 111 | // 检查设置的服务器名称是否有效 112 | private static void checkServerName(String serverName) { 113 | if (serverName == null) { 114 | throw new FastIPCException("请指定服务器名称(" + FastIPCNative.ERR_ServerName + ")!"); 115 | } else { 116 | int len = serverName.Length; 117 | if (len == 0) throw new FastIPCException("请指定服务器名称(" + FastIPCNative.ERR_ServerName + ")!"); 118 | for (int i = 0; i < len; i++) { 119 | char c = serverName[i]; 120 | if (c == '-') continue; 121 | if ('0' <= c || c >= '-') continue; 122 | if ('A' <= c || c >= 'Z') continue; 123 | if ('a' <= c || c >= 'z') continue; 124 | throw new FastIPCException("服务器名称包含无效字符(" + FastIPCNative.ERR_ServerName + ")!"); 125 | } 126 | } 127 | } 128 | 129 | // 将字符串指针对应数据写入到数据流中,主要用于分段传输的数据的拼接 130 | public static void readPtr(Stream bos, IntPtr ptr, int dataLen) { 131 | if (ptr.ToInt32() == 0) return; 132 | byte[] data = new byte[dataLen]; 133 | Marshal.Copy(ptr, data, 0, dataLen); 134 | bos.Write(data, 0, dataLen); 135 | } 136 | 137 | // 将字符串指针转换为字符串:读取时只读取指定长度的数据 138 | public static string ptr2string(IntPtr ptr, int dataLen) { 139 | if (ptr.ToInt32() == 0) return ""; 140 | byte[] data = new byte[dataLen]; 141 | Marshal.Copy(ptr, data, 0, dataLen); 142 | string rtn = Encoding.UTF8.GetString(data); 143 | return rtn; 144 | } 145 | 146 | // 将字符串指针转换为字符串:一次性将指针对应的全部数据读完 147 | public static string ptr2string(IntPtr ptr) { 148 | if (ptr.ToInt32() == 0) return ""; 149 | string s_unicode = Marshal.PtrToStringUni(ptr); 150 | byte[] buffer = Encoding.Unicode.GetBytes(s_unicode); 151 | string rtn = Encoding.UTF8.GetString(buffer); 152 | int idx = rtn.IndexOf((char)0); 153 | if (idx >= 0) rtn = rtn.Substring(0, idx); 154 | return rtn; 155 | } 156 | } 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /FastIPC_CSharp_Demo/Form1.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 437, 17 122 | 123 | 124 | 125 | 126 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 127 | YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJHSURBVDhPxZBdSNNhFMb/F110ZZEVhVBgeeHNICiiuggp 128 | olAUyyxI0oSaH1QYC3N+tKnp5ubm1JUua5uuqdNKMwr7kApFItTUkWZqVhSVYmao5Nevvy7UoYR3HXh4 129 | 4XCe33nOKyy3lAY7l9RWMo0O/raWXxEyo5spVYTNvOGyfIRPfW+ptOkXqaPl6T83hcRmExSdgzAz3NVm 130 | YWyoYla/B+1M9JtxWLPpaH22JORIjI6gKAMB0jyEimIdo4OlbuaprwVMOOMovammpDADc34qppwUrmnl 131 | 5Kni3aFlFg2j3y1z5mnRTJccnNIltQhwq0jFry+mOXNtpWZWDx1Z1NhV3C3JwGFOw25SYjVe5oYhiUKd 132 | HKMmwQUrMWUw/CF3NnZvvYKqUh1TvUroS3fXe7HXkwidMngTS2t5KLbregSzMY2f3Wr4qKW6LJvGR1rX 133 | 0MLor8OhKYTJBn/GHvvxrliCTBrsOqXIoOBHh5K+hmSq7FqmexTQHuUytkaKxuNMNgYyVneA4Qd7GKjc 134 | hjLaRzxH7gIU6JIZaEvgtk1D8wsxSWecCDgNzWFMvwxm/PkhRmr3Mli1nW9lvjRdWc0Jf+/5jzRmyWmv 135 | S+GOLQu6U6BFjPvqKOP1AYw88WOoZif9DgmfLVtxaj1RSLdwNvrkPCA3M54KqxrnvRia9MKcGrUrqFOt 136 | 5H7qKsqT1mGO9+Lqhc2ELdw+U/r0i+gVZ8hMiCDx3DHORwZyKnQ/hw/uYt9uCTskPvh6e7Fp41rWr/Fg 137 | g6eHO+A/lyD8ARfG3mk9fv1YAAAAAElFTkSuQmCC 138 | 139 | 140 | 141 | 142 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 143 | YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACXSURBVDhPtZLRDcMgDETZLKMwCmzCqNQvsqVLQt3w0SdZ 144 | vgA+TKD8ndbaPI46a63Th/ag2FLEPr33swM3yonFJldxYXkkDCxN8hhDiy8doH3tEzUhE9oVmh9r+jsU 145 | axHfMebGOWpA5rw/d1XUgGI0sWVinAYILwzTNSyKs6JjV5/Wrp7E5D30rlODN+88NXhDGGzfSE4pH8BR 146 | omYqD8Q3AAAAAElFTkSuQmCC 147 | 148 | 149 | 150 | 151 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 152 | YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACXSURBVDhPtZLRDcMgDETZLKMwCmzCqNQvsqVLQt3w0SdZ 153 | vgA+TKD8ndbaPI46a63Th/ag2FLEPr33swM3yonFJldxYXkkDCxN8hhDiy8doH3tEzUhE9oVmh9r+jsU 154 | axHfMebGOWpA5rw/d1XUgGI0sWVinAYILwzTNSyKs6JjV5/Wrp7E5D30rlODN+88NXhDGGzfSE4pH8BR 155 | omYqD8Q3AAAAAElFTkSuQmCC 156 | 157 | 158 | -------------------------------------------------------------------------------- /FastIPC.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestFastIPCServer", "TestFastIPCServer\TestFastIPCServer.vcxproj", "{930A4E3B-214C-4017-B3EC-FA5733082B17}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestFastIPCClient", "TestFastIPCClient\TestFastIPCClient.vcxproj", "{B948DDC6-937F-4DF0-8960-DD77B678B67E}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FastIPC", "FastIPC\FastIPC.vcxproj", "{6BD8E842-723A-47BA-83A4-FA357465DC13}" 11 | EndProject 12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FastIPC_JNI", "FastIPC_JNI\FastIPC_JNI.vcxproj", "{759C69A5-2A94-48FF-B227-4C084A493C0C}" 13 | EndProject 14 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FastIPC_CSharp", "FastIPC_CSharp\FastIPC_CSharp.vcxproj", "{FDE79515-195F-4C3F-98EB-FB9D47839D9D}" 15 | EndProject 16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastIPC_CSharp_Lib", "FastIPC_CSharp_Lib\FastIPC_CSharp_Lib.csproj", "{4E55FA19-3BAB-4229-8819-9EA7873A5E90}" 17 | EndProject 18 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FastIPC_CSharp_Demo", "FastIPC_CSharp_Demo\FastIPC_CSharp_Demo.csproj", "{F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}" 19 | EndProject 20 | Global 21 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 22 | Debug|Any CPU = Debug|Any CPU 23 | Debug|Mixed Platforms = Debug|Mixed Platforms 24 | Debug|Win32 = Debug|Win32 25 | Release|Any CPU = Release|Any CPU 26 | Release|Mixed Platforms = Release|Mixed Platforms 27 | Release|Win32 = Release|Win32 28 | 发布版本|Any CPU = 发布版本|Any CPU 29 | 发布版本|Mixed Platforms = 发布版本|Mixed Platforms 30 | 发布版本|Win32 = 发布版本|Win32 31 | EndGlobalSection 32 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 33 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.Debug|Any CPU.ActiveCfg = Debug|Win32 34 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 35 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.Debug|Mixed Platforms.Build.0 = Debug|Win32 36 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.Debug|Win32.ActiveCfg = Debug|Win32 37 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.Debug|Win32.Build.0 = Debug|Win32 38 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.Release|Any CPU.ActiveCfg = Release|Win32 39 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.Release|Mixed Platforms.ActiveCfg = Release|Win32 40 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.Release|Mixed Platforms.Build.0 = Release|Win32 41 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.Release|Win32.ActiveCfg = Release|Win32 42 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.Release|Win32.Build.0 = Release|Win32 43 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.发布版本|Any CPU.ActiveCfg = Release|Win32 44 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.发布版本|Mixed Platforms.ActiveCfg = Release|Win32 45 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.发布版本|Mixed Platforms.Build.0 = Release|Win32 46 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.发布版本|Win32.ActiveCfg = Release|Win32 47 | {930A4E3B-214C-4017-B3EC-FA5733082B17}.发布版本|Win32.Build.0 = Release|Win32 48 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.Debug|Any CPU.ActiveCfg = Debug|Win32 49 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 50 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.Debug|Mixed Platforms.Build.0 = Debug|Win32 51 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.Debug|Win32.ActiveCfg = Debug|Win32 52 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.Debug|Win32.Build.0 = Debug|Win32 53 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.Release|Any CPU.ActiveCfg = Release|Win32 54 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.Release|Mixed Platforms.ActiveCfg = Release|Win32 55 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.Release|Mixed Platforms.Build.0 = Release|Win32 56 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.Release|Win32.ActiveCfg = Release|Win32 57 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.Release|Win32.Build.0 = Release|Win32 58 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.发布版本|Any CPU.ActiveCfg = Release|Win32 59 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.发布版本|Mixed Platforms.ActiveCfg = Release|Win32 60 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.发布版本|Mixed Platforms.Build.0 = Release|Win32 61 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.发布版本|Win32.ActiveCfg = Release|Win32 62 | {B948DDC6-937F-4DF0-8960-DD77B678B67E}.发布版本|Win32.Build.0 = Release|Win32 63 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.Debug|Any CPU.ActiveCfg = Debug|Win32 64 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 65 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.Debug|Mixed Platforms.Build.0 = Debug|Win32 66 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.Debug|Win32.ActiveCfg = Debug|Win32 67 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.Debug|Win32.Build.0 = Debug|Win32 68 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.Release|Any CPU.ActiveCfg = Release|Win32 69 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.Release|Mixed Platforms.ActiveCfg = Release|Win32 70 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.Release|Mixed Platforms.Build.0 = Release|Win32 71 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.Release|Win32.ActiveCfg = Release|Win32 72 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.Release|Win32.Build.0 = Release|Win32 73 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.发布版本|Any CPU.ActiveCfg = Release|Win32 74 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.发布版本|Mixed Platforms.ActiveCfg = Release|Win32 75 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.发布版本|Mixed Platforms.Build.0 = Release|Win32 76 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.发布版本|Win32.ActiveCfg = Release|Win32 77 | {6BD8E842-723A-47BA-83A4-FA357465DC13}.发布版本|Win32.Build.0 = Release|Win32 78 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.Debug|Any CPU.ActiveCfg = Debug|Win32 79 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 80 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.Debug|Mixed Platforms.Build.0 = Debug|Win32 81 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.Debug|Win32.ActiveCfg = Debug|Win32 82 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.Debug|Win32.Build.0 = Debug|Win32 83 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.Release|Any CPU.ActiveCfg = Release|Win32 84 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.Release|Mixed Platforms.ActiveCfg = Release|Win32 85 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.Release|Mixed Platforms.Build.0 = Release|Win32 86 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.Release|Win32.ActiveCfg = Release|Win32 87 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.Release|Win32.Build.0 = Release|Win32 88 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.发布版本|Any CPU.ActiveCfg = Release|Win32 89 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.发布版本|Mixed Platforms.ActiveCfg = Release|Win32 90 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.发布版本|Mixed Platforms.Build.0 = Release|Win32 91 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.发布版本|Win32.ActiveCfg = Release|Win32 92 | {759C69A5-2A94-48FF-B227-4C084A493C0C}.发布版本|Win32.Build.0 = Release|Win32 93 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.Debug|Any CPU.ActiveCfg = Debug|Win32 94 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 95 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.Debug|Mixed Platforms.Build.0 = Debug|Win32 96 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.Debug|Win32.ActiveCfg = Debug|Win32 97 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.Debug|Win32.Build.0 = Debug|Win32 98 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.Release|Any CPU.ActiveCfg = Release|Win32 99 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.Release|Mixed Platforms.ActiveCfg = Release|Win32 100 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.Release|Mixed Platforms.Build.0 = Release|Win32 101 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.Release|Win32.ActiveCfg = Release|Win32 102 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.Release|Win32.Build.0 = Release|Win32 103 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.发布版本|Any CPU.ActiveCfg = Release|Win32 104 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.发布版本|Mixed Platforms.ActiveCfg = Release|Win32 105 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.发布版本|Mixed Platforms.Build.0 = Release|Win32 106 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.发布版本|Win32.ActiveCfg = Release|Win32 107 | {FDE79515-195F-4C3F-98EB-FB9D47839D9D}.发布版本|Win32.Build.0 = Release|Win32 108 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 109 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.Debug|Any CPU.Build.0 = Debug|Any CPU 110 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 111 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 112 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.Debug|Win32.ActiveCfg = Debug|Any CPU 113 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.Release|Any CPU.ActiveCfg = Release|Any CPU 114 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.Release|Any CPU.Build.0 = Release|Any CPU 115 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 116 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.Release|Mixed Platforms.Build.0 = Release|Any CPU 117 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.Release|Win32.ActiveCfg = Release|Any CPU 118 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.发布版本|Any CPU.ActiveCfg = Release|Any CPU 119 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.发布版本|Any CPU.Build.0 = Release|Any CPU 120 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.发布版本|Mixed Platforms.ActiveCfg = Release|Any CPU 121 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.发布版本|Mixed Platforms.Build.0 = Release|Any CPU 122 | {4E55FA19-3BAB-4229-8819-9EA7873A5E90}.发布版本|Win32.ActiveCfg = Release|Any CPU 123 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 124 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.Debug|Any CPU.Build.0 = Debug|Any CPU 125 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 126 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 127 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.Debug|Win32.ActiveCfg = Debug|Any CPU 128 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.Release|Any CPU.ActiveCfg = Release|Any CPU 129 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.Release|Any CPU.Build.0 = Release|Any CPU 130 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 131 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.Release|Mixed Platforms.Build.0 = Release|Any CPU 132 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.Release|Win32.ActiveCfg = Release|Any CPU 133 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.发布版本|Any CPU.ActiveCfg = 发布版本|Any CPU 134 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.发布版本|Any CPU.Build.0 = 发布版本|Any CPU 135 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.发布版本|Mixed Platforms.ActiveCfg = 发布版本|Any CPU 136 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.发布版本|Mixed Platforms.Build.0 = 发布版本|Any CPU 137 | {F54DAD0F-570F-45E9-8F9C-61A3BCC4476D}.发布版本|Win32.ActiveCfg = 发布版本|Any CPU 138 | EndGlobalSection 139 | GlobalSection(SolutionProperties) = preSolution 140 | HideSolutionNode = FALSE 141 | EndGlobalSection 142 | EndGlobal 143 | -------------------------------------------------------------------------------- /FastIPC_JNI/jni_jdk1_6_24/jni.h: -------------------------------------------------------------------------------- 1 | /* 2 | * %W% %E% 3 | * 4 | * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. 5 | * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 | */ 7 | 8 | /* 9 | * We used part of Netscape's Java Runtime Interface (JRI) as the starting 10 | * point of our design and implementation. 11 | */ 12 | 13 | /****************************************************************************** 14 | * Java Runtime Interface 15 | * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. 16 | *****************************************************************************/ 17 | 18 | #ifndef _JAVASOFT_JNI_H_ 19 | #define _JAVASOFT_JNI_H_ 20 | 21 | #include 22 | #include 23 | 24 | /* jni_md.h contains the machine-dependent typedefs for jbyte, jint 25 | and jlong */ 26 | 27 | #include "jni_md.h" 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | /* 34 | * JNI Types 35 | */ 36 | 37 | #ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H 38 | 39 | typedef unsigned char jboolean; 40 | typedef unsigned short jchar; 41 | typedef short jshort; 42 | typedef float jfloat; 43 | typedef double jdouble; 44 | 45 | typedef jint jsize; 46 | 47 | #ifdef __cplusplus 48 | 49 | class _jobject {}; 50 | class _jclass : public _jobject {}; 51 | class _jthrowable : public _jobject {}; 52 | class _jstring : public _jobject {}; 53 | class _jarray : public _jobject {}; 54 | class _jbooleanArray : public _jarray {}; 55 | class _jbyteArray : public _jarray {}; 56 | class _jcharArray : public _jarray {}; 57 | class _jshortArray : public _jarray {}; 58 | class _jintArray : public _jarray {}; 59 | class _jlongArray : public _jarray {}; 60 | class _jfloatArray : public _jarray {}; 61 | class _jdoubleArray : public _jarray {}; 62 | class _jobjectArray : public _jarray {}; 63 | 64 | typedef _jobject *jobject; 65 | typedef _jclass *jclass; 66 | typedef _jthrowable *jthrowable; 67 | typedef _jstring *jstring; 68 | typedef _jarray *jarray; 69 | typedef _jbooleanArray *jbooleanArray; 70 | typedef _jbyteArray *jbyteArray; 71 | typedef _jcharArray *jcharArray; 72 | typedef _jshortArray *jshortArray; 73 | typedef _jintArray *jintArray; 74 | typedef _jlongArray *jlongArray; 75 | typedef _jfloatArray *jfloatArray; 76 | typedef _jdoubleArray *jdoubleArray; 77 | typedef _jobjectArray *jobjectArray; 78 | 79 | #else 80 | 81 | struct _jobject; 82 | 83 | typedef struct _jobject *jobject; 84 | typedef jobject jclass; 85 | typedef jobject jthrowable; 86 | typedef jobject jstring; 87 | typedef jobject jarray; 88 | typedef jarray jbooleanArray; 89 | typedef jarray jbyteArray; 90 | typedef jarray jcharArray; 91 | typedef jarray jshortArray; 92 | typedef jarray jintArray; 93 | typedef jarray jlongArray; 94 | typedef jarray jfloatArray; 95 | typedef jarray jdoubleArray; 96 | typedef jarray jobjectArray; 97 | 98 | #endif 99 | 100 | typedef jobject jweak; 101 | 102 | typedef union jvalue { 103 | jboolean z; 104 | jbyte b; 105 | jchar c; 106 | jshort s; 107 | jint i; 108 | jlong j; 109 | jfloat f; 110 | jdouble d; 111 | jobject l; 112 | } jvalue; 113 | 114 | struct _jfieldID; 115 | typedef struct _jfieldID *jfieldID; 116 | 117 | struct _jmethodID; 118 | typedef struct _jmethodID *jmethodID; 119 | 120 | /* Return values from jobjectRefType */ 121 | typedef enum _jobjectType { 122 | JNIInvalidRefType = 0, 123 | JNILocalRefType = 1, 124 | JNIGlobalRefType = 2, 125 | JNIWeakGlobalRefType = 3 126 | } jobjectRefType; 127 | 128 | 129 | #endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */ 130 | 131 | /* 132 | * jboolean constants 133 | */ 134 | 135 | #define JNI_FALSE 0 136 | #define JNI_TRUE 1 137 | 138 | /* 139 | * possible return values for JNI functions. 140 | */ 141 | 142 | #define JNI_OK 0 /* success */ 143 | #define JNI_ERR (-1) /* unknown error */ 144 | #define JNI_EDETACHED (-2) /* thread detached from the VM */ 145 | #define JNI_EVERSION (-3) /* JNI version error */ 146 | #define JNI_ENOMEM (-4) /* not enough memory */ 147 | #define JNI_EEXIST (-5) /* VM already created */ 148 | #define JNI_EINVAL (-6) /* invalid arguments */ 149 | 150 | /* 151 | * used in ReleaseScalarArrayElements 152 | */ 153 | 154 | #define JNI_COMMIT 1 155 | #define JNI_ABORT 2 156 | 157 | /* 158 | * used in RegisterNatives to describe native method name, signature, 159 | * and function pointer. 160 | */ 161 | 162 | typedef struct { 163 | char *name; 164 | char *signature; 165 | void *fnPtr; 166 | } JNINativeMethod; 167 | 168 | /* 169 | * JNI Native Method Interface. 170 | */ 171 | 172 | struct JNINativeInterface_; 173 | 174 | struct JNIEnv_; 175 | 176 | #ifdef __cplusplus 177 | typedef JNIEnv_ JNIEnv; 178 | #else 179 | typedef const struct JNINativeInterface_ *JNIEnv; 180 | #endif 181 | 182 | /* 183 | * JNI Invocation Interface. 184 | */ 185 | 186 | struct JNIInvokeInterface_; 187 | 188 | struct JavaVM_; 189 | 190 | #ifdef __cplusplus 191 | typedef JavaVM_ JavaVM; 192 | #else 193 | typedef const struct JNIInvokeInterface_ *JavaVM; 194 | #endif 195 | 196 | struct JNINativeInterface_ { 197 | void *reserved0; 198 | void *reserved1; 199 | void *reserved2; 200 | 201 | void *reserved3; 202 | jint (JNICALL *GetVersion)(JNIEnv *env); 203 | 204 | jclass (JNICALL *DefineClass) 205 | (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, 206 | jsize len); 207 | jclass (JNICALL *FindClass) 208 | (JNIEnv *env, const char *name); 209 | 210 | jmethodID (JNICALL *FromReflectedMethod) 211 | (JNIEnv *env, jobject method); 212 | jfieldID (JNICALL *FromReflectedField) 213 | (JNIEnv *env, jobject field); 214 | 215 | jobject (JNICALL *ToReflectedMethod) 216 | (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic); 217 | 218 | jclass (JNICALL *GetSuperclass) 219 | (JNIEnv *env, jclass sub); 220 | jboolean (JNICALL *IsAssignableFrom) 221 | (JNIEnv *env, jclass sub, jclass sup); 222 | 223 | jobject (JNICALL *ToReflectedField) 224 | (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic); 225 | 226 | jint (JNICALL *Throw) 227 | (JNIEnv *env, jthrowable obj); 228 | jint (JNICALL *ThrowNew) 229 | (JNIEnv *env, jclass clazz, const char *msg); 230 | jthrowable (JNICALL *ExceptionOccurred) 231 | (JNIEnv *env); 232 | void (JNICALL *ExceptionDescribe) 233 | (JNIEnv *env); 234 | void (JNICALL *ExceptionClear) 235 | (JNIEnv *env); 236 | void (JNICALL *FatalError) 237 | (JNIEnv *env, const char *msg); 238 | 239 | jint (JNICALL *PushLocalFrame) 240 | (JNIEnv *env, jint capacity); 241 | jobject (JNICALL *PopLocalFrame) 242 | (JNIEnv *env, jobject result); 243 | 244 | jobject (JNICALL *NewGlobalRef) 245 | (JNIEnv *env, jobject lobj); 246 | void (JNICALL *DeleteGlobalRef) 247 | (JNIEnv *env, jobject gref); 248 | void (JNICALL *DeleteLocalRef) 249 | (JNIEnv *env, jobject obj); 250 | jboolean (JNICALL *IsSameObject) 251 | (JNIEnv *env, jobject obj1, jobject obj2); 252 | jobject (JNICALL *NewLocalRef) 253 | (JNIEnv *env, jobject ref); 254 | jint (JNICALL *EnsureLocalCapacity) 255 | (JNIEnv *env, jint capacity); 256 | 257 | jobject (JNICALL *AllocObject) 258 | (JNIEnv *env, jclass clazz); 259 | jobject (JNICALL *NewObject) 260 | (JNIEnv *env, jclass clazz, jmethodID methodID, ...); 261 | jobject (JNICALL *NewObjectV) 262 | (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); 263 | jobject (JNICALL *NewObjectA) 264 | (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); 265 | 266 | jclass (JNICALL *GetObjectClass) 267 | (JNIEnv *env, jobject obj); 268 | jboolean (JNICALL *IsInstanceOf) 269 | (JNIEnv *env, jobject obj, jclass clazz); 270 | 271 | jmethodID (JNICALL *GetMethodID) 272 | (JNIEnv *env, jclass clazz, const char *name, const char *sig); 273 | 274 | jobject (JNICALL *CallObjectMethod) 275 | (JNIEnv *env, jobject obj, jmethodID methodID, ...); 276 | jobject (JNICALL *CallObjectMethodV) 277 | (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); 278 | jobject (JNICALL *CallObjectMethodA) 279 | (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); 280 | 281 | jboolean (JNICALL *CallBooleanMethod) 282 | (JNIEnv *env, jobject obj, jmethodID methodID, ...); 283 | jboolean (JNICALL *CallBooleanMethodV) 284 | (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); 285 | jboolean (JNICALL *CallBooleanMethodA) 286 | (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); 287 | 288 | jbyte (JNICALL *CallByteMethod) 289 | (JNIEnv *env, jobject obj, jmethodID methodID, ...); 290 | jbyte (JNICALL *CallByteMethodV) 291 | (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); 292 | jbyte (JNICALL *CallByteMethodA) 293 | (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); 294 | 295 | jchar (JNICALL *CallCharMethod) 296 | (JNIEnv *env, jobject obj, jmethodID methodID, ...); 297 | jchar (JNICALL *CallCharMethodV) 298 | (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); 299 | jchar (JNICALL *CallCharMethodA) 300 | (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); 301 | 302 | jshort (JNICALL *CallShortMethod) 303 | (JNIEnv *env, jobject obj, jmethodID methodID, ...); 304 | jshort (JNICALL *CallShortMethodV) 305 | (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); 306 | jshort (JNICALL *CallShortMethodA) 307 | (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); 308 | 309 | jint (JNICALL *CallIntMethod) 310 | (JNIEnv *env, jobject obj, jmethodID methodID, ...); 311 | jint (JNICALL *CallIntMethodV) 312 | (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); 313 | jint (JNICALL *CallIntMethodA) 314 | (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); 315 | 316 | jlong (JNICALL *CallLongMethod) 317 | (JNIEnv *env, jobject obj, jmethodID methodID, ...); 318 | jlong (JNICALL *CallLongMethodV) 319 | (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); 320 | jlong (JNICALL *CallLongMethodA) 321 | (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); 322 | 323 | jfloat (JNICALL *CallFloatMethod) 324 | (JNIEnv *env, jobject obj, jmethodID methodID, ...); 325 | jfloat (JNICALL *CallFloatMethodV) 326 | (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); 327 | jfloat (JNICALL *CallFloatMethodA) 328 | (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); 329 | 330 | jdouble (JNICALL *CallDoubleMethod) 331 | (JNIEnv *env, jobject obj, jmethodID methodID, ...); 332 | jdouble (JNICALL *CallDoubleMethodV) 333 | (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); 334 | jdouble (JNICALL *CallDoubleMethodA) 335 | (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); 336 | 337 | void (JNICALL *CallVoidMethod) 338 | (JNIEnv *env, jobject obj, jmethodID methodID, ...); 339 | void (JNICALL *CallVoidMethodV) 340 | (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); 341 | void (JNICALL *CallVoidMethodA) 342 | (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); 343 | 344 | jobject (JNICALL *CallNonvirtualObjectMethod) 345 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); 346 | jobject (JNICALL *CallNonvirtualObjectMethodV) 347 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 348 | va_list args); 349 | jobject (JNICALL *CallNonvirtualObjectMethodA) 350 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 351 | const jvalue * args); 352 | 353 | jboolean (JNICALL *CallNonvirtualBooleanMethod) 354 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); 355 | jboolean (JNICALL *CallNonvirtualBooleanMethodV) 356 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 357 | va_list args); 358 | jboolean (JNICALL *CallNonvirtualBooleanMethodA) 359 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 360 | const jvalue * args); 361 | 362 | jbyte (JNICALL *CallNonvirtualByteMethod) 363 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); 364 | jbyte (JNICALL *CallNonvirtualByteMethodV) 365 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 366 | va_list args); 367 | jbyte (JNICALL *CallNonvirtualByteMethodA) 368 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 369 | const jvalue *args); 370 | 371 | jchar (JNICALL *CallNonvirtualCharMethod) 372 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); 373 | jchar (JNICALL *CallNonvirtualCharMethodV) 374 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 375 | va_list args); 376 | jchar (JNICALL *CallNonvirtualCharMethodA) 377 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 378 | const jvalue *args); 379 | 380 | jshort (JNICALL *CallNonvirtualShortMethod) 381 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); 382 | jshort (JNICALL *CallNonvirtualShortMethodV) 383 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 384 | va_list args); 385 | jshort (JNICALL *CallNonvirtualShortMethodA) 386 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 387 | const jvalue *args); 388 | 389 | jint (JNICALL *CallNonvirtualIntMethod) 390 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); 391 | jint (JNICALL *CallNonvirtualIntMethodV) 392 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 393 | va_list args); 394 | jint (JNICALL *CallNonvirtualIntMethodA) 395 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 396 | const jvalue *args); 397 | 398 | jlong (JNICALL *CallNonvirtualLongMethod) 399 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); 400 | jlong (JNICALL *CallNonvirtualLongMethodV) 401 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 402 | va_list args); 403 | jlong (JNICALL *CallNonvirtualLongMethodA) 404 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 405 | const jvalue *args); 406 | 407 | jfloat (JNICALL *CallNonvirtualFloatMethod) 408 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); 409 | jfloat (JNICALL *CallNonvirtualFloatMethodV) 410 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 411 | va_list args); 412 | jfloat (JNICALL *CallNonvirtualFloatMethodA) 413 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 414 | const jvalue *args); 415 | 416 | jdouble (JNICALL *CallNonvirtualDoubleMethod) 417 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); 418 | jdouble (JNICALL *CallNonvirtualDoubleMethodV) 419 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 420 | va_list args); 421 | jdouble (JNICALL *CallNonvirtualDoubleMethodA) 422 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 423 | const jvalue *args); 424 | 425 | void (JNICALL *CallNonvirtualVoidMethod) 426 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); 427 | void (JNICALL *CallNonvirtualVoidMethodV) 428 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 429 | va_list args); 430 | void (JNICALL *CallNonvirtualVoidMethodA) 431 | (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 432 | const jvalue * args); 433 | 434 | jfieldID (JNICALL *GetFieldID) 435 | (JNIEnv *env, jclass clazz, const char *name, const char *sig); 436 | 437 | jobject (JNICALL *GetObjectField) 438 | (JNIEnv *env, jobject obj, jfieldID fieldID); 439 | jboolean (JNICALL *GetBooleanField) 440 | (JNIEnv *env, jobject obj, jfieldID fieldID); 441 | jbyte (JNICALL *GetByteField) 442 | (JNIEnv *env, jobject obj, jfieldID fieldID); 443 | jchar (JNICALL *GetCharField) 444 | (JNIEnv *env, jobject obj, jfieldID fieldID); 445 | jshort (JNICALL *GetShortField) 446 | (JNIEnv *env, jobject obj, jfieldID fieldID); 447 | jint (JNICALL *GetIntField) 448 | (JNIEnv *env, jobject obj, jfieldID fieldID); 449 | jlong (JNICALL *GetLongField) 450 | (JNIEnv *env, jobject obj, jfieldID fieldID); 451 | jfloat (JNICALL *GetFloatField) 452 | (JNIEnv *env, jobject obj, jfieldID fieldID); 453 | jdouble (JNICALL *GetDoubleField) 454 | (JNIEnv *env, jobject obj, jfieldID fieldID); 455 | 456 | void (JNICALL *SetObjectField) 457 | (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val); 458 | void (JNICALL *SetBooleanField) 459 | (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val); 460 | void (JNICALL *SetByteField) 461 | (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val); 462 | void (JNICALL *SetCharField) 463 | (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val); 464 | void (JNICALL *SetShortField) 465 | (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val); 466 | void (JNICALL *SetIntField) 467 | (JNIEnv *env, jobject obj, jfieldID fieldID, jint val); 468 | void (JNICALL *SetLongField) 469 | (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val); 470 | void (JNICALL *SetFloatField) 471 | (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val); 472 | void (JNICALL *SetDoubleField) 473 | (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val); 474 | 475 | jmethodID (JNICALL *GetStaticMethodID) 476 | (JNIEnv *env, jclass clazz, const char *name, const char *sig); 477 | 478 | jobject (JNICALL *CallStaticObjectMethod) 479 | (JNIEnv *env, jclass clazz, jmethodID methodID, ...); 480 | jobject (JNICALL *CallStaticObjectMethodV) 481 | (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); 482 | jobject (JNICALL *CallStaticObjectMethodA) 483 | (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); 484 | 485 | jboolean (JNICALL *CallStaticBooleanMethod) 486 | (JNIEnv *env, jclass clazz, jmethodID methodID, ...); 487 | jboolean (JNICALL *CallStaticBooleanMethodV) 488 | (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); 489 | jboolean (JNICALL *CallStaticBooleanMethodA) 490 | (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); 491 | 492 | jbyte (JNICALL *CallStaticByteMethod) 493 | (JNIEnv *env, jclass clazz, jmethodID methodID, ...); 494 | jbyte (JNICALL *CallStaticByteMethodV) 495 | (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); 496 | jbyte (JNICALL *CallStaticByteMethodA) 497 | (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); 498 | 499 | jchar (JNICALL *CallStaticCharMethod) 500 | (JNIEnv *env, jclass clazz, jmethodID methodID, ...); 501 | jchar (JNICALL *CallStaticCharMethodV) 502 | (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); 503 | jchar (JNICALL *CallStaticCharMethodA) 504 | (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); 505 | 506 | jshort (JNICALL *CallStaticShortMethod) 507 | (JNIEnv *env, jclass clazz, jmethodID methodID, ...); 508 | jshort (JNICALL *CallStaticShortMethodV) 509 | (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); 510 | jshort (JNICALL *CallStaticShortMethodA) 511 | (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); 512 | 513 | jint (JNICALL *CallStaticIntMethod) 514 | (JNIEnv *env, jclass clazz, jmethodID methodID, ...); 515 | jint (JNICALL *CallStaticIntMethodV) 516 | (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); 517 | jint (JNICALL *CallStaticIntMethodA) 518 | (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); 519 | 520 | jlong (JNICALL *CallStaticLongMethod) 521 | (JNIEnv *env, jclass clazz, jmethodID methodID, ...); 522 | jlong (JNICALL *CallStaticLongMethodV) 523 | (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); 524 | jlong (JNICALL *CallStaticLongMethodA) 525 | (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); 526 | 527 | jfloat (JNICALL *CallStaticFloatMethod) 528 | (JNIEnv *env, jclass clazz, jmethodID methodID, ...); 529 | jfloat (JNICALL *CallStaticFloatMethodV) 530 | (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); 531 | jfloat (JNICALL *CallStaticFloatMethodA) 532 | (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); 533 | 534 | jdouble (JNICALL *CallStaticDoubleMethod) 535 | (JNIEnv *env, jclass clazz, jmethodID methodID, ...); 536 | jdouble (JNICALL *CallStaticDoubleMethodV) 537 | (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); 538 | jdouble (JNICALL *CallStaticDoubleMethodA) 539 | (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); 540 | 541 | void (JNICALL *CallStaticVoidMethod) 542 | (JNIEnv *env, jclass cls, jmethodID methodID, ...); 543 | void (JNICALL *CallStaticVoidMethodV) 544 | (JNIEnv *env, jclass cls, jmethodID methodID, va_list args); 545 | void (JNICALL *CallStaticVoidMethodA) 546 | (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args); 547 | 548 | jfieldID (JNICALL *GetStaticFieldID) 549 | (JNIEnv *env, jclass clazz, const char *name, const char *sig); 550 | jobject (JNICALL *GetStaticObjectField) 551 | (JNIEnv *env, jclass clazz, jfieldID fieldID); 552 | jboolean (JNICALL *GetStaticBooleanField) 553 | (JNIEnv *env, jclass clazz, jfieldID fieldID); 554 | jbyte (JNICALL *GetStaticByteField) 555 | (JNIEnv *env, jclass clazz, jfieldID fieldID); 556 | jchar (JNICALL *GetStaticCharField) 557 | (JNIEnv *env, jclass clazz, jfieldID fieldID); 558 | jshort (JNICALL *GetStaticShortField) 559 | (JNIEnv *env, jclass clazz, jfieldID fieldID); 560 | jint (JNICALL *GetStaticIntField) 561 | (JNIEnv *env, jclass clazz, jfieldID fieldID); 562 | jlong (JNICALL *GetStaticLongField) 563 | (JNIEnv *env, jclass clazz, jfieldID fieldID); 564 | jfloat (JNICALL *GetStaticFloatField) 565 | (JNIEnv *env, jclass clazz, jfieldID fieldID); 566 | jdouble (JNICALL *GetStaticDoubleField) 567 | (JNIEnv *env, jclass clazz, jfieldID fieldID); 568 | 569 | void (JNICALL *SetStaticObjectField) 570 | (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value); 571 | void (JNICALL *SetStaticBooleanField) 572 | (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value); 573 | void (JNICALL *SetStaticByteField) 574 | (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value); 575 | void (JNICALL *SetStaticCharField) 576 | (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value); 577 | void (JNICALL *SetStaticShortField) 578 | (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value); 579 | void (JNICALL *SetStaticIntField) 580 | (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value); 581 | void (JNICALL *SetStaticLongField) 582 | (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value); 583 | void (JNICALL *SetStaticFloatField) 584 | (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value); 585 | void (JNICALL *SetStaticDoubleField) 586 | (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value); 587 | 588 | jstring (JNICALL *NewString) 589 | (JNIEnv *env, const jchar *unicode, jsize len); 590 | jsize (JNICALL *GetStringLength) 591 | (JNIEnv *env, jstring str); 592 | const jchar *(JNICALL *GetStringChars) 593 | (JNIEnv *env, jstring str, jboolean *isCopy); 594 | void (JNICALL *ReleaseStringChars) 595 | (JNIEnv *env, jstring str, const jchar *chars); 596 | 597 | jstring (JNICALL *NewStringUTF) 598 | (JNIEnv *env, const char *utf); 599 | jsize (JNICALL *GetStringUTFLength) 600 | (JNIEnv *env, jstring str); 601 | const char* (JNICALL *GetStringUTFChars) 602 | (JNIEnv *env, jstring str, jboolean *isCopy); 603 | void (JNICALL *ReleaseStringUTFChars) 604 | (JNIEnv *env, jstring str, const char* chars); 605 | 606 | 607 | jsize (JNICALL *GetArrayLength) 608 | (JNIEnv *env, jarray array); 609 | 610 | jobjectArray (JNICALL *NewObjectArray) 611 | (JNIEnv *env, jsize len, jclass clazz, jobject init); 612 | jobject (JNICALL *GetObjectArrayElement) 613 | (JNIEnv *env, jobjectArray array, jsize index); 614 | void (JNICALL *SetObjectArrayElement) 615 | (JNIEnv *env, jobjectArray array, jsize index, jobject val); 616 | 617 | jbooleanArray (JNICALL *NewBooleanArray) 618 | (JNIEnv *env, jsize len); 619 | jbyteArray (JNICALL *NewByteArray) 620 | (JNIEnv *env, jsize len); 621 | jcharArray (JNICALL *NewCharArray) 622 | (JNIEnv *env, jsize len); 623 | jshortArray (JNICALL *NewShortArray) 624 | (JNIEnv *env, jsize len); 625 | jintArray (JNICALL *NewIntArray) 626 | (JNIEnv *env, jsize len); 627 | jlongArray (JNICALL *NewLongArray) 628 | (JNIEnv *env, jsize len); 629 | jfloatArray (JNICALL *NewFloatArray) 630 | (JNIEnv *env, jsize len); 631 | jdoubleArray (JNICALL *NewDoubleArray) 632 | (JNIEnv *env, jsize len); 633 | 634 | jboolean * (JNICALL *GetBooleanArrayElements) 635 | (JNIEnv *env, jbooleanArray array, jboolean *isCopy); 636 | jbyte * (JNICALL *GetByteArrayElements) 637 | (JNIEnv *env, jbyteArray array, jboolean *isCopy); 638 | jchar * (JNICALL *GetCharArrayElements) 639 | (JNIEnv *env, jcharArray array, jboolean *isCopy); 640 | jshort * (JNICALL *GetShortArrayElements) 641 | (JNIEnv *env, jshortArray array, jboolean *isCopy); 642 | jint * (JNICALL *GetIntArrayElements) 643 | (JNIEnv *env, jintArray array, jboolean *isCopy); 644 | jlong * (JNICALL *GetLongArrayElements) 645 | (JNIEnv *env, jlongArray array, jboolean *isCopy); 646 | jfloat * (JNICALL *GetFloatArrayElements) 647 | (JNIEnv *env, jfloatArray array, jboolean *isCopy); 648 | jdouble * (JNICALL *GetDoubleArrayElements) 649 | (JNIEnv *env, jdoubleArray array, jboolean *isCopy); 650 | 651 | void (JNICALL *ReleaseBooleanArrayElements) 652 | (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode); 653 | void (JNICALL *ReleaseByteArrayElements) 654 | (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode); 655 | void (JNICALL *ReleaseCharArrayElements) 656 | (JNIEnv *env, jcharArray array, jchar *elems, jint mode); 657 | void (JNICALL *ReleaseShortArrayElements) 658 | (JNIEnv *env, jshortArray array, jshort *elems, jint mode); 659 | void (JNICALL *ReleaseIntArrayElements) 660 | (JNIEnv *env, jintArray array, jint *elems, jint mode); 661 | void (JNICALL *ReleaseLongArrayElements) 662 | (JNIEnv *env, jlongArray array, jlong *elems, jint mode); 663 | void (JNICALL *ReleaseFloatArrayElements) 664 | (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode); 665 | void (JNICALL *ReleaseDoubleArrayElements) 666 | (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode); 667 | 668 | void (JNICALL *GetBooleanArrayRegion) 669 | (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); 670 | void (JNICALL *GetByteArrayRegion) 671 | (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); 672 | void (JNICALL *GetCharArrayRegion) 673 | (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); 674 | void (JNICALL *GetShortArrayRegion) 675 | (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); 676 | void (JNICALL *GetIntArrayRegion) 677 | (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); 678 | void (JNICALL *GetLongArrayRegion) 679 | (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); 680 | void (JNICALL *GetFloatArrayRegion) 681 | (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); 682 | void (JNICALL *GetDoubleArrayRegion) 683 | (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); 684 | 685 | void (JNICALL *SetBooleanArrayRegion) 686 | (JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf); 687 | void (JNICALL *SetByteArrayRegion) 688 | (JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf); 689 | void (JNICALL *SetCharArrayRegion) 690 | (JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf); 691 | void (JNICALL *SetShortArrayRegion) 692 | (JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf); 693 | void (JNICALL *SetIntArrayRegion) 694 | (JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf); 695 | void (JNICALL *SetLongArrayRegion) 696 | (JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf); 697 | void (JNICALL *SetFloatArrayRegion) 698 | (JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf); 699 | void (JNICALL *SetDoubleArrayRegion) 700 | (JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf); 701 | 702 | jint (JNICALL *RegisterNatives) 703 | (JNIEnv *env, jclass clazz, const JNINativeMethod *methods, 704 | jint nMethods); 705 | jint (JNICALL *UnregisterNatives) 706 | (JNIEnv *env, jclass clazz); 707 | 708 | jint (JNICALL *MonitorEnter) 709 | (JNIEnv *env, jobject obj); 710 | jint (JNICALL *MonitorExit) 711 | (JNIEnv *env, jobject obj); 712 | 713 | jint (JNICALL *GetJavaVM) 714 | (JNIEnv *env, JavaVM **vm); 715 | 716 | void (JNICALL *GetStringRegion) 717 | (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf); 718 | void (JNICALL *GetStringUTFRegion) 719 | (JNIEnv *env, jstring str, jsize start, jsize len, char *buf); 720 | 721 | void * (JNICALL *GetPrimitiveArrayCritical) 722 | (JNIEnv *env, jarray array, jboolean *isCopy); 723 | void (JNICALL *ReleasePrimitiveArrayCritical) 724 | (JNIEnv *env, jarray array, void *carray, jint mode); 725 | 726 | const jchar * (JNICALL *GetStringCritical) 727 | (JNIEnv *env, jstring string, jboolean *isCopy); 728 | void (JNICALL *ReleaseStringCritical) 729 | (JNIEnv *env, jstring string, const jchar *cstring); 730 | 731 | jweak (JNICALL *NewWeakGlobalRef) 732 | (JNIEnv *env, jobject obj); 733 | void (JNICALL *DeleteWeakGlobalRef) 734 | (JNIEnv *env, jweak ref); 735 | 736 | jboolean (JNICALL *ExceptionCheck) 737 | (JNIEnv *env); 738 | 739 | jobject (JNICALL *NewDirectByteBuffer) 740 | (JNIEnv* env, void* address, jlong capacity); 741 | void* (JNICALL *GetDirectBufferAddress) 742 | (JNIEnv* env, jobject buf); 743 | jlong (JNICALL *GetDirectBufferCapacity) 744 | (JNIEnv* env, jobject buf); 745 | 746 | /* New JNI 1.6 Features */ 747 | 748 | jobjectRefType (JNICALL *GetObjectRefType) 749 | (JNIEnv* env, jobject obj); 750 | }; 751 | 752 | /* 753 | * We use inlined functions for C++ so that programmers can write: 754 | * 755 | * env->FindClass("java/lang/String") 756 | * 757 | * in C++ rather than: 758 | * 759 | * (*env)->FindClass(env, "java/lang/String") 760 | * 761 | * in C. 762 | */ 763 | 764 | struct JNIEnv_ { 765 | const struct JNINativeInterface_ *functions; 766 | #ifdef __cplusplus 767 | 768 | jint GetVersion() { 769 | return functions->GetVersion(this); 770 | } 771 | jclass DefineClass(const char *name, jobject loader, const jbyte *buf, 772 | jsize len) { 773 | return functions->DefineClass(this, name, loader, buf, len); 774 | } 775 | jclass FindClass(const char *name) { 776 | return functions->FindClass(this, name); 777 | } 778 | jmethodID FromReflectedMethod(jobject method) { 779 | return functions->FromReflectedMethod(this,method); 780 | } 781 | jfieldID FromReflectedField(jobject field) { 782 | return functions->FromReflectedField(this,field); 783 | } 784 | 785 | jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) { 786 | return functions->ToReflectedMethod(this, cls, methodID, isStatic); 787 | } 788 | 789 | jclass GetSuperclass(jclass sub) { 790 | return functions->GetSuperclass(this, sub); 791 | } 792 | jboolean IsAssignableFrom(jclass sub, jclass sup) { 793 | return functions->IsAssignableFrom(this, sub, sup); 794 | } 795 | 796 | jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) { 797 | return functions->ToReflectedField(this,cls,fieldID,isStatic); 798 | } 799 | 800 | jint Throw(jthrowable obj) { 801 | return functions->Throw(this, obj); 802 | } 803 | jint ThrowNew(jclass clazz, const char *msg) { 804 | return functions->ThrowNew(this, clazz, msg); 805 | } 806 | jthrowable ExceptionOccurred() { 807 | return functions->ExceptionOccurred(this); 808 | } 809 | void ExceptionDescribe() { 810 | functions->ExceptionDescribe(this); 811 | } 812 | void ExceptionClear() { 813 | functions->ExceptionClear(this); 814 | } 815 | void FatalError(const char *msg) { 816 | functions->FatalError(this, msg); 817 | } 818 | 819 | jint PushLocalFrame(jint capacity) { 820 | return functions->PushLocalFrame(this,capacity); 821 | } 822 | jobject PopLocalFrame(jobject result) { 823 | return functions->PopLocalFrame(this,result); 824 | } 825 | 826 | jobject NewGlobalRef(jobject lobj) { 827 | return functions->NewGlobalRef(this,lobj); 828 | } 829 | void DeleteGlobalRef(jobject gref) { 830 | functions->DeleteGlobalRef(this,gref); 831 | } 832 | void DeleteLocalRef(jobject obj) { 833 | functions->DeleteLocalRef(this, obj); 834 | } 835 | 836 | jboolean IsSameObject(jobject obj1, jobject obj2) { 837 | return functions->IsSameObject(this,obj1,obj2); 838 | } 839 | 840 | jobject NewLocalRef(jobject ref) { 841 | return functions->NewLocalRef(this,ref); 842 | } 843 | jint EnsureLocalCapacity(jint capacity) { 844 | return functions->EnsureLocalCapacity(this,capacity); 845 | } 846 | 847 | jobject AllocObject(jclass clazz) { 848 | return functions->AllocObject(this,clazz); 849 | } 850 | jobject NewObject(jclass clazz, jmethodID methodID, ...) { 851 | va_list args; 852 | jobject result; 853 | va_start(args, methodID); 854 | result = functions->NewObjectV(this,clazz,methodID,args); 855 | va_end(args); 856 | return result; 857 | } 858 | jobject NewObjectV(jclass clazz, jmethodID methodID, 859 | va_list args) { 860 | return functions->NewObjectV(this,clazz,methodID,args); 861 | } 862 | jobject NewObjectA(jclass clazz, jmethodID methodID, 863 | const jvalue *args) { 864 | return functions->NewObjectA(this,clazz,methodID,args); 865 | } 866 | 867 | jclass GetObjectClass(jobject obj) { 868 | return functions->GetObjectClass(this,obj); 869 | } 870 | jboolean IsInstanceOf(jobject obj, jclass clazz) { 871 | return functions->IsInstanceOf(this,obj,clazz); 872 | } 873 | 874 | jmethodID GetMethodID(jclass clazz, const char *name, 875 | const char *sig) { 876 | return functions->GetMethodID(this,clazz,name,sig); 877 | } 878 | 879 | jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) { 880 | va_list args; 881 | jobject result; 882 | va_start(args,methodID); 883 | result = functions->CallObjectMethodV(this,obj,methodID,args); 884 | va_end(args); 885 | return result; 886 | } 887 | jobject CallObjectMethodV(jobject obj, jmethodID methodID, 888 | va_list args) { 889 | return functions->CallObjectMethodV(this,obj,methodID,args); 890 | } 891 | jobject CallObjectMethodA(jobject obj, jmethodID methodID, 892 | const jvalue * args) { 893 | return functions->CallObjectMethodA(this,obj,methodID,args); 894 | } 895 | 896 | jboolean CallBooleanMethod(jobject obj, 897 | jmethodID methodID, ...) { 898 | va_list args; 899 | jboolean result; 900 | va_start(args,methodID); 901 | result = functions->CallBooleanMethodV(this,obj,methodID,args); 902 | va_end(args); 903 | return result; 904 | } 905 | jboolean CallBooleanMethodV(jobject obj, jmethodID methodID, 906 | va_list args) { 907 | return functions->CallBooleanMethodV(this,obj,methodID,args); 908 | } 909 | jboolean CallBooleanMethodA(jobject obj, jmethodID methodID, 910 | const jvalue * args) { 911 | return functions->CallBooleanMethodA(this,obj,methodID, args); 912 | } 913 | 914 | jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) { 915 | va_list args; 916 | jbyte result; 917 | va_start(args,methodID); 918 | result = functions->CallByteMethodV(this,obj,methodID,args); 919 | va_end(args); 920 | return result; 921 | } 922 | jbyte CallByteMethodV(jobject obj, jmethodID methodID, 923 | va_list args) { 924 | return functions->CallByteMethodV(this,obj,methodID,args); 925 | } 926 | jbyte CallByteMethodA(jobject obj, jmethodID methodID, 927 | const jvalue * args) { 928 | return functions->CallByteMethodA(this,obj,methodID,args); 929 | } 930 | 931 | jchar CallCharMethod(jobject obj, jmethodID methodID, ...) { 932 | va_list args; 933 | jchar result; 934 | va_start(args,methodID); 935 | result = functions->CallCharMethodV(this,obj,methodID,args); 936 | va_end(args); 937 | return result; 938 | } 939 | jchar CallCharMethodV(jobject obj, jmethodID methodID, 940 | va_list args) { 941 | return functions->CallCharMethodV(this,obj,methodID,args); 942 | } 943 | jchar CallCharMethodA(jobject obj, jmethodID methodID, 944 | const jvalue * args) { 945 | return functions->CallCharMethodA(this,obj,methodID,args); 946 | } 947 | 948 | jshort CallShortMethod(jobject obj, jmethodID methodID, ...) { 949 | va_list args; 950 | jshort result; 951 | va_start(args,methodID); 952 | result = functions->CallShortMethodV(this,obj,methodID,args); 953 | va_end(args); 954 | return result; 955 | } 956 | jshort CallShortMethodV(jobject obj, jmethodID methodID, 957 | va_list args) { 958 | return functions->CallShortMethodV(this,obj,methodID,args); 959 | } 960 | jshort CallShortMethodA(jobject obj, jmethodID methodID, 961 | const jvalue * args) { 962 | return functions->CallShortMethodA(this,obj,methodID,args); 963 | } 964 | 965 | jint CallIntMethod(jobject obj, jmethodID methodID, ...) { 966 | va_list args; 967 | jint result; 968 | va_start(args,methodID); 969 | result = functions->CallIntMethodV(this,obj,methodID,args); 970 | va_end(args); 971 | return result; 972 | } 973 | jint CallIntMethodV(jobject obj, jmethodID methodID, 974 | va_list args) { 975 | return functions->CallIntMethodV(this,obj,methodID,args); 976 | } 977 | jint CallIntMethodA(jobject obj, jmethodID methodID, 978 | const jvalue * args) { 979 | return functions->CallIntMethodA(this,obj,methodID,args); 980 | } 981 | 982 | jlong CallLongMethod(jobject obj, jmethodID methodID, ...) { 983 | va_list args; 984 | jlong result; 985 | va_start(args,methodID); 986 | result = functions->CallLongMethodV(this,obj,methodID,args); 987 | va_end(args); 988 | return result; 989 | } 990 | jlong CallLongMethodV(jobject obj, jmethodID methodID, 991 | va_list args) { 992 | return functions->CallLongMethodV(this,obj,methodID,args); 993 | } 994 | jlong CallLongMethodA(jobject obj, jmethodID methodID, 995 | const jvalue * args) { 996 | return functions->CallLongMethodA(this,obj,methodID,args); 997 | } 998 | 999 | jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) { 1000 | va_list args; 1001 | jfloat result; 1002 | va_start(args,methodID); 1003 | result = functions->CallFloatMethodV(this,obj,methodID,args); 1004 | va_end(args); 1005 | return result; 1006 | } 1007 | jfloat CallFloatMethodV(jobject obj, jmethodID methodID, 1008 | va_list args) { 1009 | return functions->CallFloatMethodV(this,obj,methodID,args); 1010 | } 1011 | jfloat CallFloatMethodA(jobject obj, jmethodID methodID, 1012 | const jvalue * args) { 1013 | return functions->CallFloatMethodA(this,obj,methodID,args); 1014 | } 1015 | 1016 | jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) { 1017 | va_list args; 1018 | jdouble result; 1019 | va_start(args,methodID); 1020 | result = functions->CallDoubleMethodV(this,obj,methodID,args); 1021 | va_end(args); 1022 | return result; 1023 | } 1024 | jdouble CallDoubleMethodV(jobject obj, jmethodID methodID, 1025 | va_list args) { 1026 | return functions->CallDoubleMethodV(this,obj,methodID,args); 1027 | } 1028 | jdouble CallDoubleMethodA(jobject obj, jmethodID methodID, 1029 | const jvalue * args) { 1030 | return functions->CallDoubleMethodA(this,obj,methodID,args); 1031 | } 1032 | 1033 | void CallVoidMethod(jobject obj, jmethodID methodID, ...) { 1034 | va_list args; 1035 | va_start(args,methodID); 1036 | functions->CallVoidMethodV(this,obj,methodID,args); 1037 | va_end(args); 1038 | } 1039 | void CallVoidMethodV(jobject obj, jmethodID methodID, 1040 | va_list args) { 1041 | functions->CallVoidMethodV(this,obj,methodID,args); 1042 | } 1043 | void CallVoidMethodA(jobject obj, jmethodID methodID, 1044 | const jvalue * args) { 1045 | functions->CallVoidMethodA(this,obj,methodID,args); 1046 | } 1047 | 1048 | jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz, 1049 | jmethodID methodID, ...) { 1050 | va_list args; 1051 | jobject result; 1052 | va_start(args,methodID); 1053 | result = functions->CallNonvirtualObjectMethodV(this,obj,clazz, 1054 | methodID,args); 1055 | va_end(args); 1056 | return result; 1057 | } 1058 | jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz, 1059 | jmethodID methodID, va_list args) { 1060 | return functions->CallNonvirtualObjectMethodV(this,obj,clazz, 1061 | methodID,args); 1062 | } 1063 | jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz, 1064 | jmethodID methodID, const jvalue * args) { 1065 | return functions->CallNonvirtualObjectMethodA(this,obj,clazz, 1066 | methodID,args); 1067 | } 1068 | 1069 | jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz, 1070 | jmethodID methodID, ...) { 1071 | va_list args; 1072 | jboolean result; 1073 | va_start(args,methodID); 1074 | result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz, 1075 | methodID,args); 1076 | va_end(args); 1077 | return result; 1078 | } 1079 | jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz, 1080 | jmethodID methodID, va_list args) { 1081 | return functions->CallNonvirtualBooleanMethodV(this,obj,clazz, 1082 | methodID,args); 1083 | } 1084 | jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz, 1085 | jmethodID methodID, const jvalue * args) { 1086 | return functions->CallNonvirtualBooleanMethodA(this,obj,clazz, 1087 | methodID, args); 1088 | } 1089 | 1090 | jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz, 1091 | jmethodID methodID, ...) { 1092 | va_list args; 1093 | jbyte result; 1094 | va_start(args,methodID); 1095 | result = functions->CallNonvirtualByteMethodV(this,obj,clazz, 1096 | methodID,args); 1097 | va_end(args); 1098 | return result; 1099 | } 1100 | jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz, 1101 | jmethodID methodID, va_list args) { 1102 | return functions->CallNonvirtualByteMethodV(this,obj,clazz, 1103 | methodID,args); 1104 | } 1105 | jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz, 1106 | jmethodID methodID, const jvalue * args) { 1107 | return functions->CallNonvirtualByteMethodA(this,obj,clazz, 1108 | methodID,args); 1109 | } 1110 | 1111 | jchar CallNonvirtualCharMethod(jobject obj, jclass clazz, 1112 | jmethodID methodID, ...) { 1113 | va_list args; 1114 | jchar result; 1115 | va_start(args,methodID); 1116 | result = functions->CallNonvirtualCharMethodV(this,obj,clazz, 1117 | methodID,args); 1118 | va_end(args); 1119 | return result; 1120 | } 1121 | jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz, 1122 | jmethodID methodID, va_list args) { 1123 | return functions->CallNonvirtualCharMethodV(this,obj,clazz, 1124 | methodID,args); 1125 | } 1126 | jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz, 1127 | jmethodID methodID, const jvalue * args) { 1128 | return functions->CallNonvirtualCharMethodA(this,obj,clazz, 1129 | methodID,args); 1130 | } 1131 | 1132 | jshort CallNonvirtualShortMethod(jobject obj, jclass clazz, 1133 | jmethodID methodID, ...) { 1134 | va_list args; 1135 | jshort result; 1136 | va_start(args,methodID); 1137 | result = functions->CallNonvirtualShortMethodV(this,obj,clazz, 1138 | methodID,args); 1139 | va_end(args); 1140 | return result; 1141 | } 1142 | jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz, 1143 | jmethodID methodID, va_list args) { 1144 | return functions->CallNonvirtualShortMethodV(this,obj,clazz, 1145 | methodID,args); 1146 | } 1147 | jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz, 1148 | jmethodID methodID, const jvalue * args) { 1149 | return functions->CallNonvirtualShortMethodA(this,obj,clazz, 1150 | methodID,args); 1151 | } 1152 | 1153 | jint CallNonvirtualIntMethod(jobject obj, jclass clazz, 1154 | jmethodID methodID, ...) { 1155 | va_list args; 1156 | jint result; 1157 | va_start(args,methodID); 1158 | result = functions->CallNonvirtualIntMethodV(this,obj,clazz, 1159 | methodID,args); 1160 | va_end(args); 1161 | return result; 1162 | } 1163 | jint CallNonvirtualIntMethodV(jobject obj, jclass clazz, 1164 | jmethodID methodID, va_list args) { 1165 | return functions->CallNonvirtualIntMethodV(this,obj,clazz, 1166 | methodID,args); 1167 | } 1168 | jint CallNonvirtualIntMethodA(jobject obj, jclass clazz, 1169 | jmethodID methodID, const jvalue * args) { 1170 | return functions->CallNonvirtualIntMethodA(this,obj,clazz, 1171 | methodID,args); 1172 | } 1173 | 1174 | jlong CallNonvirtualLongMethod(jobject obj, jclass clazz, 1175 | jmethodID methodID, ...) { 1176 | va_list args; 1177 | jlong result; 1178 | va_start(args,methodID); 1179 | result = functions->CallNonvirtualLongMethodV(this,obj,clazz, 1180 | methodID,args); 1181 | va_end(args); 1182 | return result; 1183 | } 1184 | jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz, 1185 | jmethodID methodID, va_list args) { 1186 | return functions->CallNonvirtualLongMethodV(this,obj,clazz, 1187 | methodID,args); 1188 | } 1189 | jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz, 1190 | jmethodID methodID, const jvalue * args) { 1191 | return functions->CallNonvirtualLongMethodA(this,obj,clazz, 1192 | methodID,args); 1193 | } 1194 | 1195 | jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz, 1196 | jmethodID methodID, ...) { 1197 | va_list args; 1198 | jfloat result; 1199 | va_start(args,methodID); 1200 | result = functions->CallNonvirtualFloatMethodV(this,obj,clazz, 1201 | methodID,args); 1202 | va_end(args); 1203 | return result; 1204 | } 1205 | jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz, 1206 | jmethodID methodID, 1207 | va_list args) { 1208 | return functions->CallNonvirtualFloatMethodV(this,obj,clazz, 1209 | methodID,args); 1210 | } 1211 | jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz, 1212 | jmethodID methodID, 1213 | const jvalue * args) { 1214 | return functions->CallNonvirtualFloatMethodA(this,obj,clazz, 1215 | methodID,args); 1216 | } 1217 | 1218 | jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz, 1219 | jmethodID methodID, ...) { 1220 | va_list args; 1221 | jdouble result; 1222 | va_start(args,methodID); 1223 | result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz, 1224 | methodID,args); 1225 | va_end(args); 1226 | return result; 1227 | } 1228 | jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz, 1229 | jmethodID methodID, 1230 | va_list args) { 1231 | return functions->CallNonvirtualDoubleMethodV(this,obj,clazz, 1232 | methodID,args); 1233 | } 1234 | jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz, 1235 | jmethodID methodID, 1236 | const jvalue * args) { 1237 | return functions->CallNonvirtualDoubleMethodA(this,obj,clazz, 1238 | methodID,args); 1239 | } 1240 | 1241 | void CallNonvirtualVoidMethod(jobject obj, jclass clazz, 1242 | jmethodID methodID, ...) { 1243 | va_list args; 1244 | va_start(args,methodID); 1245 | functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); 1246 | va_end(args); 1247 | } 1248 | void CallNonvirtualVoidMethodV(jobject obj, jclass clazz, 1249 | jmethodID methodID, 1250 | va_list args) { 1251 | functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); 1252 | } 1253 | void CallNonvirtualVoidMethodA(jobject obj, jclass clazz, 1254 | jmethodID methodID, 1255 | const jvalue * args) { 1256 | functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args); 1257 | } 1258 | 1259 | jfieldID GetFieldID(jclass clazz, const char *name, 1260 | const char *sig) { 1261 | return functions->GetFieldID(this,clazz,name,sig); 1262 | } 1263 | 1264 | jobject GetObjectField(jobject obj, jfieldID fieldID) { 1265 | return functions->GetObjectField(this,obj,fieldID); 1266 | } 1267 | jboolean GetBooleanField(jobject obj, jfieldID fieldID) { 1268 | return functions->GetBooleanField(this,obj,fieldID); 1269 | } 1270 | jbyte GetByteField(jobject obj, jfieldID fieldID) { 1271 | return functions->GetByteField(this,obj,fieldID); 1272 | } 1273 | jchar GetCharField(jobject obj, jfieldID fieldID) { 1274 | return functions->GetCharField(this,obj,fieldID); 1275 | } 1276 | jshort GetShortField(jobject obj, jfieldID fieldID) { 1277 | return functions->GetShortField(this,obj,fieldID); 1278 | } 1279 | jint GetIntField(jobject obj, jfieldID fieldID) { 1280 | return functions->GetIntField(this,obj,fieldID); 1281 | } 1282 | jlong GetLongField(jobject obj, jfieldID fieldID) { 1283 | return functions->GetLongField(this,obj,fieldID); 1284 | } 1285 | jfloat GetFloatField(jobject obj, jfieldID fieldID) { 1286 | return functions->GetFloatField(this,obj,fieldID); 1287 | } 1288 | jdouble GetDoubleField(jobject obj, jfieldID fieldID) { 1289 | return functions->GetDoubleField(this,obj,fieldID); 1290 | } 1291 | 1292 | void SetObjectField(jobject obj, jfieldID fieldID, jobject val) { 1293 | functions->SetObjectField(this,obj,fieldID,val); 1294 | } 1295 | void SetBooleanField(jobject obj, jfieldID fieldID, 1296 | jboolean val) { 1297 | functions->SetBooleanField(this,obj,fieldID,val); 1298 | } 1299 | void SetByteField(jobject obj, jfieldID fieldID, 1300 | jbyte val) { 1301 | functions->SetByteField(this,obj,fieldID,val); 1302 | } 1303 | void SetCharField(jobject obj, jfieldID fieldID, 1304 | jchar val) { 1305 | functions->SetCharField(this,obj,fieldID,val); 1306 | } 1307 | void SetShortField(jobject obj, jfieldID fieldID, 1308 | jshort val) { 1309 | functions->SetShortField(this,obj,fieldID,val); 1310 | } 1311 | void SetIntField(jobject obj, jfieldID fieldID, 1312 | jint val) { 1313 | functions->SetIntField(this,obj,fieldID,val); 1314 | } 1315 | void SetLongField(jobject obj, jfieldID fieldID, 1316 | jlong val) { 1317 | functions->SetLongField(this,obj,fieldID,val); 1318 | } 1319 | void SetFloatField(jobject obj, jfieldID fieldID, 1320 | jfloat val) { 1321 | functions->SetFloatField(this,obj,fieldID,val); 1322 | } 1323 | void SetDoubleField(jobject obj, jfieldID fieldID, 1324 | jdouble val) { 1325 | functions->SetDoubleField(this,obj,fieldID,val); 1326 | } 1327 | 1328 | jmethodID GetStaticMethodID(jclass clazz, const char *name, 1329 | const char *sig) { 1330 | return functions->GetStaticMethodID(this,clazz,name,sig); 1331 | } 1332 | 1333 | jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID, 1334 | ...) { 1335 | va_list args; 1336 | jobject result; 1337 | va_start(args,methodID); 1338 | result = functions->CallStaticObjectMethodV(this,clazz,methodID,args); 1339 | va_end(args); 1340 | return result; 1341 | } 1342 | jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID, 1343 | va_list args) { 1344 | return functions->CallStaticObjectMethodV(this,clazz,methodID,args); 1345 | } 1346 | jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID, 1347 | const jvalue *args) { 1348 | return functions->CallStaticObjectMethodA(this,clazz,methodID,args); 1349 | } 1350 | 1351 | jboolean CallStaticBooleanMethod(jclass clazz, 1352 | jmethodID methodID, ...) { 1353 | va_list args; 1354 | jboolean result; 1355 | va_start(args,methodID); 1356 | result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args); 1357 | va_end(args); 1358 | return result; 1359 | } 1360 | jboolean CallStaticBooleanMethodV(jclass clazz, 1361 | jmethodID methodID, va_list args) { 1362 | return functions->CallStaticBooleanMethodV(this,clazz,methodID,args); 1363 | } 1364 | jboolean CallStaticBooleanMethodA(jclass clazz, 1365 | jmethodID methodID, const jvalue *args) { 1366 | return functions->CallStaticBooleanMethodA(this,clazz,methodID,args); 1367 | } 1368 | 1369 | jbyte CallStaticByteMethod(jclass clazz, 1370 | jmethodID methodID, ...) { 1371 | va_list args; 1372 | jbyte result; 1373 | va_start(args,methodID); 1374 | result = functions->CallStaticByteMethodV(this,clazz,methodID,args); 1375 | va_end(args); 1376 | return result; 1377 | } 1378 | jbyte CallStaticByteMethodV(jclass clazz, 1379 | jmethodID methodID, va_list args) { 1380 | return functions->CallStaticByteMethodV(this,clazz,methodID,args); 1381 | } 1382 | jbyte CallStaticByteMethodA(jclass clazz, 1383 | jmethodID methodID, const jvalue *args) { 1384 | return functions->CallStaticByteMethodA(this,clazz,methodID,args); 1385 | } 1386 | 1387 | jchar CallStaticCharMethod(jclass clazz, 1388 | jmethodID methodID, ...) { 1389 | va_list args; 1390 | jchar result; 1391 | va_start(args,methodID); 1392 | result = functions->CallStaticCharMethodV(this,clazz,methodID,args); 1393 | va_end(args); 1394 | return result; 1395 | } 1396 | jchar CallStaticCharMethodV(jclass clazz, 1397 | jmethodID methodID, va_list args) { 1398 | return functions->CallStaticCharMethodV(this,clazz,methodID,args); 1399 | } 1400 | jchar CallStaticCharMethodA(jclass clazz, 1401 | jmethodID methodID, const jvalue *args) { 1402 | return functions->CallStaticCharMethodA(this,clazz,methodID,args); 1403 | } 1404 | 1405 | jshort CallStaticShortMethod(jclass clazz, 1406 | jmethodID methodID, ...) { 1407 | va_list args; 1408 | jshort result; 1409 | va_start(args,methodID); 1410 | result = functions->CallStaticShortMethodV(this,clazz,methodID,args); 1411 | va_end(args); 1412 | return result; 1413 | } 1414 | jshort CallStaticShortMethodV(jclass clazz, 1415 | jmethodID methodID, va_list args) { 1416 | return functions->CallStaticShortMethodV(this,clazz,methodID,args); 1417 | } 1418 | jshort CallStaticShortMethodA(jclass clazz, 1419 | jmethodID methodID, const jvalue *args) { 1420 | return functions->CallStaticShortMethodA(this,clazz,methodID,args); 1421 | } 1422 | 1423 | jint CallStaticIntMethod(jclass clazz, 1424 | jmethodID methodID, ...) { 1425 | va_list args; 1426 | jint result; 1427 | va_start(args,methodID); 1428 | result = functions->CallStaticIntMethodV(this,clazz,methodID,args); 1429 | va_end(args); 1430 | return result; 1431 | } 1432 | jint CallStaticIntMethodV(jclass clazz, 1433 | jmethodID methodID, va_list args) { 1434 | return functions->CallStaticIntMethodV(this,clazz,methodID,args); 1435 | } 1436 | jint CallStaticIntMethodA(jclass clazz, 1437 | jmethodID methodID, const jvalue *args) { 1438 | return functions->CallStaticIntMethodA(this,clazz,methodID,args); 1439 | } 1440 | 1441 | jlong CallStaticLongMethod(jclass clazz, 1442 | jmethodID methodID, ...) { 1443 | va_list args; 1444 | jlong result; 1445 | va_start(args,methodID); 1446 | result = functions->CallStaticLongMethodV(this,clazz,methodID,args); 1447 | va_end(args); 1448 | return result; 1449 | } 1450 | jlong CallStaticLongMethodV(jclass clazz, 1451 | jmethodID methodID, va_list args) { 1452 | return functions->CallStaticLongMethodV(this,clazz,methodID,args); 1453 | } 1454 | jlong CallStaticLongMethodA(jclass clazz, 1455 | jmethodID methodID, const jvalue *args) { 1456 | return functions->CallStaticLongMethodA(this,clazz,methodID,args); 1457 | } 1458 | 1459 | jfloat CallStaticFloatMethod(jclass clazz, 1460 | jmethodID methodID, ...) { 1461 | va_list args; 1462 | jfloat result; 1463 | va_start(args,methodID); 1464 | result = functions->CallStaticFloatMethodV(this,clazz,methodID,args); 1465 | va_end(args); 1466 | return result; 1467 | } 1468 | jfloat CallStaticFloatMethodV(jclass clazz, 1469 | jmethodID methodID, va_list args) { 1470 | return functions->CallStaticFloatMethodV(this,clazz,methodID,args); 1471 | } 1472 | jfloat CallStaticFloatMethodA(jclass clazz, 1473 | jmethodID methodID, const jvalue *args) { 1474 | return functions->CallStaticFloatMethodA(this,clazz,methodID,args); 1475 | } 1476 | 1477 | jdouble CallStaticDoubleMethod(jclass clazz, 1478 | jmethodID methodID, ...) { 1479 | va_list args; 1480 | jdouble result; 1481 | va_start(args,methodID); 1482 | result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args); 1483 | va_end(args); 1484 | return result; 1485 | } 1486 | jdouble CallStaticDoubleMethodV(jclass clazz, 1487 | jmethodID methodID, va_list args) { 1488 | return functions->CallStaticDoubleMethodV(this,clazz,methodID,args); 1489 | } 1490 | jdouble CallStaticDoubleMethodA(jclass clazz, 1491 | jmethodID methodID, const jvalue *args) { 1492 | return functions->CallStaticDoubleMethodA(this,clazz,methodID,args); 1493 | } 1494 | 1495 | void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) { 1496 | va_list args; 1497 | va_start(args,methodID); 1498 | functions->CallStaticVoidMethodV(this,cls,methodID,args); 1499 | va_end(args); 1500 | } 1501 | void CallStaticVoidMethodV(jclass cls, jmethodID methodID, 1502 | va_list args) { 1503 | functions->CallStaticVoidMethodV(this,cls,methodID,args); 1504 | } 1505 | void CallStaticVoidMethodA(jclass cls, jmethodID methodID, 1506 | const jvalue * args) { 1507 | functions->CallStaticVoidMethodA(this,cls,methodID,args); 1508 | } 1509 | 1510 | jfieldID GetStaticFieldID(jclass clazz, const char *name, 1511 | const char *sig) { 1512 | return functions->GetStaticFieldID(this,clazz,name,sig); 1513 | } 1514 | jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) { 1515 | return functions->GetStaticObjectField(this,clazz,fieldID); 1516 | } 1517 | jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) { 1518 | return functions->GetStaticBooleanField(this,clazz,fieldID); 1519 | } 1520 | jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) { 1521 | return functions->GetStaticByteField(this,clazz,fieldID); 1522 | } 1523 | jchar GetStaticCharField(jclass clazz, jfieldID fieldID) { 1524 | return functions->GetStaticCharField(this,clazz,fieldID); 1525 | } 1526 | jshort GetStaticShortField(jclass clazz, jfieldID fieldID) { 1527 | return functions->GetStaticShortField(this,clazz,fieldID); 1528 | } 1529 | jint GetStaticIntField(jclass clazz, jfieldID fieldID) { 1530 | return functions->GetStaticIntField(this,clazz,fieldID); 1531 | } 1532 | jlong GetStaticLongField(jclass clazz, jfieldID fieldID) { 1533 | return functions->GetStaticLongField(this,clazz,fieldID); 1534 | } 1535 | jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) { 1536 | return functions->GetStaticFloatField(this,clazz,fieldID); 1537 | } 1538 | jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) { 1539 | return functions->GetStaticDoubleField(this,clazz,fieldID); 1540 | } 1541 | 1542 | void SetStaticObjectField(jclass clazz, jfieldID fieldID, 1543 | jobject value) { 1544 | functions->SetStaticObjectField(this,clazz,fieldID,value); 1545 | } 1546 | void SetStaticBooleanField(jclass clazz, jfieldID fieldID, 1547 | jboolean value) { 1548 | functions->SetStaticBooleanField(this,clazz,fieldID,value); 1549 | } 1550 | void SetStaticByteField(jclass clazz, jfieldID fieldID, 1551 | jbyte value) { 1552 | functions->SetStaticByteField(this,clazz,fieldID,value); 1553 | } 1554 | void SetStaticCharField(jclass clazz, jfieldID fieldID, 1555 | jchar value) { 1556 | functions->SetStaticCharField(this,clazz,fieldID,value); 1557 | } 1558 | void SetStaticShortField(jclass clazz, jfieldID fieldID, 1559 | jshort value) { 1560 | functions->SetStaticShortField(this,clazz,fieldID,value); 1561 | } 1562 | void SetStaticIntField(jclass clazz, jfieldID fieldID, 1563 | jint value) { 1564 | functions->SetStaticIntField(this,clazz,fieldID,value); 1565 | } 1566 | void SetStaticLongField(jclass clazz, jfieldID fieldID, 1567 | jlong value) { 1568 | functions->SetStaticLongField(this,clazz,fieldID,value); 1569 | } 1570 | void SetStaticFloatField(jclass clazz, jfieldID fieldID, 1571 | jfloat value) { 1572 | functions->SetStaticFloatField(this,clazz,fieldID,value); 1573 | } 1574 | void SetStaticDoubleField(jclass clazz, jfieldID fieldID, 1575 | jdouble value) { 1576 | functions->SetStaticDoubleField(this,clazz,fieldID,value); 1577 | } 1578 | 1579 | jstring NewString(const jchar *unicode, jsize len) { 1580 | return functions->NewString(this,unicode,len); 1581 | } 1582 | jsize GetStringLength(jstring str) { 1583 | return functions->GetStringLength(this,str); 1584 | } 1585 | const jchar *GetStringChars(jstring str, jboolean *isCopy) { 1586 | return functions->GetStringChars(this,str,isCopy); 1587 | } 1588 | void ReleaseStringChars(jstring str, const jchar *chars) { 1589 | functions->ReleaseStringChars(this,str,chars); 1590 | } 1591 | 1592 | jstring NewStringUTF(const char *utf) { 1593 | return functions->NewStringUTF(this,utf); 1594 | } 1595 | jsize GetStringUTFLength(jstring str) { 1596 | return functions->GetStringUTFLength(this,str); 1597 | } 1598 | const char* GetStringUTFChars(jstring str, jboolean *isCopy) { 1599 | return functions->GetStringUTFChars(this,str,isCopy); 1600 | } 1601 | void ReleaseStringUTFChars(jstring str, const char* chars) { 1602 | functions->ReleaseStringUTFChars(this,str,chars); 1603 | } 1604 | 1605 | jsize GetArrayLength(jarray array) { 1606 | return functions->GetArrayLength(this,array); 1607 | } 1608 | 1609 | jobjectArray NewObjectArray(jsize len, jclass clazz, 1610 | jobject init) { 1611 | return functions->NewObjectArray(this,len,clazz,init); 1612 | } 1613 | jobject GetObjectArrayElement(jobjectArray array, jsize index) { 1614 | return functions->GetObjectArrayElement(this,array,index); 1615 | } 1616 | void SetObjectArrayElement(jobjectArray array, jsize index, 1617 | jobject val) { 1618 | functions->SetObjectArrayElement(this,array,index,val); 1619 | } 1620 | 1621 | jbooleanArray NewBooleanArray(jsize len) { 1622 | return functions->NewBooleanArray(this,len); 1623 | } 1624 | jbyteArray NewByteArray(jsize len) { 1625 | return functions->NewByteArray(this,len); 1626 | } 1627 | jcharArray NewCharArray(jsize len) { 1628 | return functions->NewCharArray(this,len); 1629 | } 1630 | jshortArray NewShortArray(jsize len) { 1631 | return functions->NewShortArray(this,len); 1632 | } 1633 | jintArray NewIntArray(jsize len) { 1634 | return functions->NewIntArray(this,len); 1635 | } 1636 | jlongArray NewLongArray(jsize len) { 1637 | return functions->NewLongArray(this,len); 1638 | } 1639 | jfloatArray NewFloatArray(jsize len) { 1640 | return functions->NewFloatArray(this,len); 1641 | } 1642 | jdoubleArray NewDoubleArray(jsize len) { 1643 | return functions->NewDoubleArray(this,len); 1644 | } 1645 | 1646 | jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) { 1647 | return functions->GetBooleanArrayElements(this,array,isCopy); 1648 | } 1649 | jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) { 1650 | return functions->GetByteArrayElements(this,array,isCopy); 1651 | } 1652 | jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) { 1653 | return functions->GetCharArrayElements(this,array,isCopy); 1654 | } 1655 | jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) { 1656 | return functions->GetShortArrayElements(this,array,isCopy); 1657 | } 1658 | jint * GetIntArrayElements(jintArray array, jboolean *isCopy) { 1659 | return functions->GetIntArrayElements(this,array,isCopy); 1660 | } 1661 | jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) { 1662 | return functions->GetLongArrayElements(this,array,isCopy); 1663 | } 1664 | jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) { 1665 | return functions->GetFloatArrayElements(this,array,isCopy); 1666 | } 1667 | jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) { 1668 | return functions->GetDoubleArrayElements(this,array,isCopy); 1669 | } 1670 | 1671 | void ReleaseBooleanArrayElements(jbooleanArray array, 1672 | jboolean *elems, 1673 | jint mode) { 1674 | functions->ReleaseBooleanArrayElements(this,array,elems,mode); 1675 | } 1676 | void ReleaseByteArrayElements(jbyteArray array, 1677 | jbyte *elems, 1678 | jint mode) { 1679 | functions->ReleaseByteArrayElements(this,array,elems,mode); 1680 | } 1681 | void ReleaseCharArrayElements(jcharArray array, 1682 | jchar *elems, 1683 | jint mode) { 1684 | functions->ReleaseCharArrayElements(this,array,elems,mode); 1685 | } 1686 | void ReleaseShortArrayElements(jshortArray array, 1687 | jshort *elems, 1688 | jint mode) { 1689 | functions->ReleaseShortArrayElements(this,array,elems,mode); 1690 | } 1691 | void ReleaseIntArrayElements(jintArray array, 1692 | jint *elems, 1693 | jint mode) { 1694 | functions->ReleaseIntArrayElements(this,array,elems,mode); 1695 | } 1696 | void ReleaseLongArrayElements(jlongArray array, 1697 | jlong *elems, 1698 | jint mode) { 1699 | functions->ReleaseLongArrayElements(this,array,elems,mode); 1700 | } 1701 | void ReleaseFloatArrayElements(jfloatArray array, 1702 | jfloat *elems, 1703 | jint mode) { 1704 | functions->ReleaseFloatArrayElements(this,array,elems,mode); 1705 | } 1706 | void ReleaseDoubleArrayElements(jdoubleArray array, 1707 | jdouble *elems, 1708 | jint mode) { 1709 | functions->ReleaseDoubleArrayElements(this,array,elems,mode); 1710 | } 1711 | 1712 | void GetBooleanArrayRegion(jbooleanArray array, 1713 | jsize start, jsize len, jboolean *buf) { 1714 | functions->GetBooleanArrayRegion(this,array,start,len,buf); 1715 | } 1716 | void GetByteArrayRegion(jbyteArray array, 1717 | jsize start, jsize len, jbyte *buf) { 1718 | functions->GetByteArrayRegion(this,array,start,len,buf); 1719 | } 1720 | void GetCharArrayRegion(jcharArray array, 1721 | jsize start, jsize len, jchar *buf) { 1722 | functions->GetCharArrayRegion(this,array,start,len,buf); 1723 | } 1724 | void GetShortArrayRegion(jshortArray array, 1725 | jsize start, jsize len, jshort *buf) { 1726 | functions->GetShortArrayRegion(this,array,start,len,buf); 1727 | } 1728 | void GetIntArrayRegion(jintArray array, 1729 | jsize start, jsize len, jint *buf) { 1730 | functions->GetIntArrayRegion(this,array,start,len,buf); 1731 | } 1732 | void GetLongArrayRegion(jlongArray array, 1733 | jsize start, jsize len, jlong *buf) { 1734 | functions->GetLongArrayRegion(this,array,start,len,buf); 1735 | } 1736 | void GetFloatArrayRegion(jfloatArray array, 1737 | jsize start, jsize len, jfloat *buf) { 1738 | functions->GetFloatArrayRegion(this,array,start,len,buf); 1739 | } 1740 | void GetDoubleArrayRegion(jdoubleArray array, 1741 | jsize start, jsize len, jdouble *buf) { 1742 | functions->GetDoubleArrayRegion(this,array,start,len,buf); 1743 | } 1744 | 1745 | void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, 1746 | const jboolean *buf) { 1747 | functions->SetBooleanArrayRegion(this,array,start,len,buf); 1748 | } 1749 | void SetByteArrayRegion(jbyteArray array, jsize start, jsize len, 1750 | const jbyte *buf) { 1751 | functions->SetByteArrayRegion(this,array,start,len,buf); 1752 | } 1753 | void SetCharArrayRegion(jcharArray array, jsize start, jsize len, 1754 | const jchar *buf) { 1755 | functions->SetCharArrayRegion(this,array,start,len,buf); 1756 | } 1757 | void SetShortArrayRegion(jshortArray array, jsize start, jsize len, 1758 | const jshort *buf) { 1759 | functions->SetShortArrayRegion(this,array,start,len,buf); 1760 | } 1761 | void SetIntArrayRegion(jintArray array, jsize start, jsize len, 1762 | const jint *buf) { 1763 | functions->SetIntArrayRegion(this,array,start,len,buf); 1764 | } 1765 | void SetLongArrayRegion(jlongArray array, jsize start, jsize len, 1766 | const jlong *buf) { 1767 | functions->SetLongArrayRegion(this,array,start,len,buf); 1768 | } 1769 | void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len, 1770 | const jfloat *buf) { 1771 | functions->SetFloatArrayRegion(this,array,start,len,buf); 1772 | } 1773 | void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, 1774 | const jdouble *buf) { 1775 | functions->SetDoubleArrayRegion(this,array,start,len,buf); 1776 | } 1777 | 1778 | jint RegisterNatives(jclass clazz, const JNINativeMethod *methods, 1779 | jint nMethods) { 1780 | return functions->RegisterNatives(this,clazz,methods,nMethods); 1781 | } 1782 | jint UnregisterNatives(jclass clazz) { 1783 | return functions->UnregisterNatives(this,clazz); 1784 | } 1785 | 1786 | jint MonitorEnter(jobject obj) { 1787 | return functions->MonitorEnter(this,obj); 1788 | } 1789 | jint MonitorExit(jobject obj) { 1790 | return functions->MonitorExit(this,obj); 1791 | } 1792 | 1793 | jint GetJavaVM(JavaVM **vm) { 1794 | return functions->GetJavaVM(this,vm); 1795 | } 1796 | 1797 | void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) { 1798 | functions->GetStringRegion(this,str,start,len,buf); 1799 | } 1800 | void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) { 1801 | functions->GetStringUTFRegion(this,str,start,len,buf); 1802 | } 1803 | 1804 | void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) { 1805 | return functions->GetPrimitiveArrayCritical(this,array,isCopy); 1806 | } 1807 | void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) { 1808 | functions->ReleasePrimitiveArrayCritical(this,array,carray,mode); 1809 | } 1810 | 1811 | const jchar * GetStringCritical(jstring string, jboolean *isCopy) { 1812 | return functions->GetStringCritical(this,string,isCopy); 1813 | } 1814 | void ReleaseStringCritical(jstring string, const jchar *cstring) { 1815 | functions->ReleaseStringCritical(this,string,cstring); 1816 | } 1817 | 1818 | jweak NewWeakGlobalRef(jobject obj) { 1819 | return functions->NewWeakGlobalRef(this,obj); 1820 | } 1821 | void DeleteWeakGlobalRef(jweak ref) { 1822 | functions->DeleteWeakGlobalRef(this,ref); 1823 | } 1824 | 1825 | jboolean ExceptionCheck() { 1826 | return functions->ExceptionCheck(this); 1827 | } 1828 | 1829 | jobject NewDirectByteBuffer(void* address, jlong capacity) { 1830 | return functions->NewDirectByteBuffer(this, address, capacity); 1831 | } 1832 | void* GetDirectBufferAddress(jobject buf) { 1833 | return functions->GetDirectBufferAddress(this, buf); 1834 | } 1835 | jlong GetDirectBufferCapacity(jobject buf) { 1836 | return functions->GetDirectBufferCapacity(this, buf); 1837 | } 1838 | jobjectRefType GetObjectRefType(jobject obj) { 1839 | return functions->GetObjectRefType(this, obj); 1840 | } 1841 | 1842 | #endif /* __cplusplus */ 1843 | }; 1844 | 1845 | typedef struct JavaVMOption { 1846 | char *optionString; 1847 | void *extraInfo; 1848 | } JavaVMOption; 1849 | 1850 | typedef struct JavaVMInitArgs { 1851 | jint version; 1852 | 1853 | jint nOptions; 1854 | JavaVMOption *options; 1855 | jboolean ignoreUnrecognized; 1856 | } JavaVMInitArgs; 1857 | 1858 | typedef struct JavaVMAttachArgs { 1859 | jint version; 1860 | 1861 | char *name; 1862 | jobject group; 1863 | } JavaVMAttachArgs; 1864 | 1865 | /* These will be VM-specific. */ 1866 | 1867 | #define JDK1_2 1868 | #define JDK1_4 1869 | 1870 | /* End VM-specific. */ 1871 | 1872 | struct JNIInvokeInterface_ { 1873 | void *reserved0; 1874 | void *reserved1; 1875 | void *reserved2; 1876 | 1877 | jint (JNICALL *DestroyJavaVM)(JavaVM *vm); 1878 | 1879 | jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args); 1880 | 1881 | jint (JNICALL *DetachCurrentThread)(JavaVM *vm); 1882 | 1883 | jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version); 1884 | 1885 | jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args); 1886 | }; 1887 | 1888 | struct JavaVM_ { 1889 | const struct JNIInvokeInterface_ *functions; 1890 | #ifdef __cplusplus 1891 | 1892 | jint DestroyJavaVM() { 1893 | return functions->DestroyJavaVM(this); 1894 | } 1895 | jint AttachCurrentThread(void **penv, void *args) { 1896 | return functions->AttachCurrentThread(this, penv, args); 1897 | } 1898 | jint DetachCurrentThread() { 1899 | return functions->DetachCurrentThread(this); 1900 | } 1901 | 1902 | jint GetEnv(void **penv, jint version) { 1903 | return functions->GetEnv(this, penv, version); 1904 | } 1905 | jint AttachCurrentThreadAsDaemon(void **penv, void *args) { 1906 | return functions->AttachCurrentThreadAsDaemon(this, penv, args); 1907 | } 1908 | #endif 1909 | }; 1910 | 1911 | #ifdef _JNI_IMPLEMENTATION_ 1912 | #define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT 1913 | #else 1914 | #define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT 1915 | #endif 1916 | _JNI_IMPORT_OR_EXPORT_ jint JNICALL 1917 | JNI_GetDefaultJavaVMInitArgs(void *args); 1918 | 1919 | _JNI_IMPORT_OR_EXPORT_ jint JNICALL 1920 | JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args); 1921 | 1922 | _JNI_IMPORT_OR_EXPORT_ jint JNICALL 1923 | JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); 1924 | 1925 | /* Defined by native libraries. */ 1926 | JNIEXPORT jint JNICALL 1927 | JNI_OnLoad(JavaVM *vm, void *reserved); 1928 | 1929 | JNIEXPORT void JNICALL 1930 | JNI_OnUnload(JavaVM *vm, void *reserved); 1931 | 1932 | #define JNI_VERSION_1_1 0x00010001 1933 | #define JNI_VERSION_1_2 0x00010002 1934 | #define JNI_VERSION_1_4 0x00010004 1935 | #define JNI_VERSION_1_6 0x00010006 1936 | 1937 | #ifdef __cplusplus 1938 | } /* extern "C" */ 1939 | #endif /* __cplusplus */ 1940 | 1941 | #endif /* !_JAVASOFT_JNI_H_ */ 1942 | 1943 | 1944 | 1945 | --------------------------------------------------------------------------------