From 66ca2f8e491f7f376a8e7d308c04c50ea1ce60b7 Mon Sep 17 00:00:00 2001 From: Zhen Tang Date: Sat, 6 Jul 2013 13:02:19 +0800 Subject: [PATCH] windows monitor stubs added. --- WindowsMonitor/Monitor/Monitor.cpp | 12 + WindowsMonitor/Monitor/Monitor.h | 7 + WindowsMonitor/Monitor/Monitor.vcxproj | 476 +++++++++++++++++ .../Monitor/Monitor.vcxproj.filters | 39 ++ WindowsMonitor/Monitor/dllmain.cpp | 19 + WindowsMonitor/Monitor/stdafx.cpp | 8 + WindowsMonitor/Monitor/stdafx.h | 16 + WindowsMonitor/Monitor/targetver.h | 8 + WindowsMonitor/Native/JNITest.h | 21 + WindowsMonitor/Native/Monitor.h | 7 + WindowsMonitor/Native/Native.cpp | 14 + WindowsMonitor/Native/Native.h | 15 + WindowsMonitor/Native/Native.vcxproj | 484 ++++++++++++++++++ WindowsMonitor/Native/Native.vcxproj.filters | 45 ++ WindowsMonitor/Native/Native.vcxproj.user | 4 + WindowsMonitor/Native/dllmain.cpp | 19 + WindowsMonitor/Native/stdafx.cpp | 8 + WindowsMonitor/Native/stdafx.h | 15 + WindowsMonitor/Native/targetver.h | 8 + WindowsMonitor/WindowsMonitor.sln | 36 ++ WindowsMonitor/WindowsMonitor.v11.suo | Bin 0 -> 46592 bytes .../java/org/bench4q/monitor/JNITest.java | 15 + 22 files changed, 1276 insertions(+) create mode 100644 WindowsMonitor/Monitor/Monitor.cpp create mode 100644 WindowsMonitor/Monitor/Monitor.h create mode 100644 WindowsMonitor/Monitor/Monitor.vcxproj create mode 100644 WindowsMonitor/Monitor/Monitor.vcxproj.filters create mode 100644 WindowsMonitor/Monitor/dllmain.cpp create mode 100644 WindowsMonitor/Monitor/stdafx.cpp create mode 100644 WindowsMonitor/Monitor/stdafx.h create mode 100644 WindowsMonitor/Monitor/targetver.h create mode 100644 WindowsMonitor/Native/JNITest.h create mode 100644 WindowsMonitor/Native/Monitor.h create mode 100644 WindowsMonitor/Native/Native.cpp create mode 100644 WindowsMonitor/Native/Native.h create mode 100644 WindowsMonitor/Native/Native.vcxproj create mode 100644 WindowsMonitor/Native/Native.vcxproj.filters create mode 100644 WindowsMonitor/Native/Native.vcxproj.user create mode 100644 WindowsMonitor/Native/dllmain.cpp create mode 100644 WindowsMonitor/Native/stdafx.cpp create mode 100644 WindowsMonitor/Native/stdafx.h create mode 100644 WindowsMonitor/Native/targetver.h create mode 100644 WindowsMonitor/WindowsMonitor.sln create mode 100644 WindowsMonitor/WindowsMonitor.v11.suo create mode 100644 src/main/java/org/bench4q/monitor/JNITest.java diff --git a/WindowsMonitor/Monitor/Monitor.cpp b/WindowsMonitor/Monitor/Monitor.cpp new file mode 100644 index 00000000..e8bfd027 --- /dev/null +++ b/WindowsMonitor/Monitor/Monitor.cpp @@ -0,0 +1,12 @@ +// Monitor.cpp : 定义 DLL 应用程序的导出函数。 +// + +#include "stdafx.h" +#include "Monitor.h" + +// 这是导出函数的一个示例。 +MONITOR_API int Add(int a,int b) +{ + return a+b; +} + diff --git a/WindowsMonitor/Monitor/Monitor.h b/WindowsMonitor/Monitor/Monitor.h new file mode 100644 index 00000000..e5e86c65 --- /dev/null +++ b/WindowsMonitor/Monitor/Monitor.h @@ -0,0 +1,7 @@ +#ifdef MONITOR_EXPORTS +#define MONITOR_API __declspec(dllexport) +#else +#define MONITOR_API __declspec(dllimport) +#endif + +MONITOR_API int Add(int a,int b); diff --git a/WindowsMonitor/Monitor/Monitor.vcxproj b/WindowsMonitor/Monitor/Monitor.vcxproj new file mode 100644 index 00000000..69ab2a92 --- /dev/null +++ b/WindowsMonitor/Monitor/Monitor.vcxproj @@ -0,0 +1,476 @@ +锘 + + + + Debug + Win32 + + + Debug + x64 + + + Release-x64 + Win32 + + + Release-x64 + x64 + + + Release-x86 + Win32 + + + Release-x86 + x64 + + + Release + Win32 + + + Release + x64 + + + x64 + Win32 + + + x64 + x64 + + + x86 + Win32 + + + x86 + x64 + + + + {200C95C6-D4F1-47CF-8178-11EF1C3B61B1} + Win32Proj + Monitor + + + + DynamicLibrary + true + v110 + Unicode + + + DynamicLibrary + true + v110 + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;MONITOR_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;MONITOR_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;MONITOR_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;MONITOR_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;MONITOR_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;MONITOR_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;MONITOR_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;MONITOR_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;MONITOR_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;MONITOR_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;MONITOR_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;MONITOR_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + + + + + + false + false + + + + + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/WindowsMonitor/Monitor/Monitor.vcxproj.filters b/WindowsMonitor/Monitor/Monitor.vcxproj.filters new file mode 100644 index 00000000..74c022ca --- /dev/null +++ b/WindowsMonitor/Monitor/Monitor.vcxproj.filters @@ -0,0 +1,39 @@ +锘 + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + 澶存枃浠 + + + 澶存枃浠 + + + 澶存枃浠 + + + + + 婧愭枃浠 + + + 婧愭枃浠 + + + 婧愭枃浠 + + + \ No newline at end of file diff --git a/WindowsMonitor/Monitor/dllmain.cpp b/WindowsMonitor/Monitor/dllmain.cpp new file mode 100644 index 00000000..260abc6d --- /dev/null +++ b/WindowsMonitor/Monitor/dllmain.cpp @@ -0,0 +1,19 @@ +// dllmain.cpp : 定义 DLL 应用程序的入口点。 +#include "stdafx.h" + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + diff --git a/WindowsMonitor/Monitor/stdafx.cpp b/WindowsMonitor/Monitor/stdafx.cpp new file mode 100644 index 00000000..0ceb0f50 --- /dev/null +++ b/WindowsMonitor/Monitor/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : 只包括标准包含文件的源文件 +// Monitor.pch 将作为预编译头 +// stdafx.obj 将包含预编译类型信息 + +#include "stdafx.h" + +// TODO: 在 STDAFX.H 中 +// 引用任何所需的附加头文件,而不是在此文件中引用 diff --git a/WindowsMonitor/Monitor/stdafx.h b/WindowsMonitor/Monitor/stdafx.h new file mode 100644 index 00000000..dea91e7d --- /dev/null +++ b/WindowsMonitor/Monitor/stdafx.h @@ -0,0 +1,16 @@ +// stdafx.h : 标准系统包含文件的包含文件, +// 或是经常使用但不常更改的 +// 特定于项目的包含文件 +// + +#pragma once + +#include "targetver.h" + +#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息 +// Windows 头文件: +#include + + + +// TODO: 在此处引用程序需要的其他头文件 diff --git a/WindowsMonitor/Monitor/targetver.h b/WindowsMonitor/Monitor/targetver.h new file mode 100644 index 00000000..7a7d2c83 --- /dev/null +++ b/WindowsMonitor/Monitor/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。 + +// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将 +// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。 + +#include diff --git a/WindowsMonitor/Native/JNITest.h b/WindowsMonitor/Native/JNITest.h new file mode 100644 index 00000000..0b575cb1 --- /dev/null +++ b/WindowsMonitor/Native/JNITest.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_bench4q_monitor_JNITest */ + +#ifndef _Included_org_bench4q_monitor_JNITest +#define _Included_org_bench4q_monitor_JNITest +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_bench4q_monitor_JNITest + * Method: add + * Signature: (II)I + */ +JNIEXPORT jint JNICALL Java_org_bench4q_monitor_JNITest_add + (JNIEnv *, jobject, jint, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/WindowsMonitor/Native/Monitor.h b/WindowsMonitor/Native/Monitor.h new file mode 100644 index 00000000..e5e86c65 --- /dev/null +++ b/WindowsMonitor/Native/Monitor.h @@ -0,0 +1,7 @@ +#ifdef MONITOR_EXPORTS +#define MONITOR_API __declspec(dllexport) +#else +#define MONITOR_API __declspec(dllimport) +#endif + +MONITOR_API int Add(int a,int b); diff --git a/WindowsMonitor/Native/Native.cpp b/WindowsMonitor/Native/Native.cpp new file mode 100644 index 00000000..dd029e29 --- /dev/null +++ b/WindowsMonitor/Native/Native.cpp @@ -0,0 +1,14 @@ +#include "stdafx.h" +#include "Native.h" +#include "Monitor.h" + +NATIVE_API int Test() +{ + return 42; +} + +JNIEXPORT jint JNICALL Java_org_bench4q_monitor_JNITest_add + (JNIEnv * environment, jobject object, jint a, jint b) +{ + return Add(a,b); +} \ No newline at end of file diff --git a/WindowsMonitor/Native/Native.h b/WindowsMonitor/Native/Native.h new file mode 100644 index 00000000..e39f0e74 --- /dev/null +++ b/WindowsMonitor/Native/Native.h @@ -0,0 +1,15 @@ +// 下列 ifdef 块是创建使从 DLL 导出更简单的 +// 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 NATIVE_EXPORTS +// 符号编译的。在使用此 DLL 的 +// 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将 +// NATIVE_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的 +// 符号视为是被导出的。 +#ifdef NATIVE_EXPORTS +#define NATIVE_API __declspec(dllexport) +#else +#define NATIVE_API __declspec(dllimport) +#endif + +#pragma comment(lib,"../x64/Debug/Monitor.lib") + +NATIVE_API int Test(void); diff --git a/WindowsMonitor/Native/Native.vcxproj b/WindowsMonitor/Native/Native.vcxproj new file mode 100644 index 00000000..4465f718 --- /dev/null +++ b/WindowsMonitor/Native/Native.vcxproj @@ -0,0 +1,484 @@ +锘 + + + + Debug + Win32 + + + Debug + x64 + + + Release-x64 + Win32 + + + Release-x64 + x64 + + + Release-x86 + Win32 + + + Release-x86 + x64 + + + Release + Win32 + + + Release + x64 + + + x64 + Win32 + + + x64 + x64 + + + x86 + Win32 + + + x86 + x64 + + + + {286E6C20-9603-4870-BD34-FF54406AE1DC} + Win32Proj + Native + + + + DynamicLibrary + true + v110 + Unicode + + + DynamicLibrary + true + v110 + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;NATIVE_EXPORTS;%(PreprocessorDefinitions) + true + $(JAVA_HOME)/include/win32;$(JAVA_HOME)/include;%(AdditionalIncludeDirectories) + + + Windows + true + + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;NATIVE_EXPORTS;%(PreprocessorDefinitions) + true + $(JAVA_HOME)/include/win32;$(JAVA_HOME)/include;%(AdditionalIncludeDirectories) + + + Windows + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;NATIVE_EXPORTS;%(PreprocessorDefinitions) + true + $(JAVA_HOME)/include/win32;$(JAVA_HOME)/include;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;NATIVE_EXPORTS;%(PreprocessorDefinitions) + true + $(JAVA_HOME)/include/win32;$(JAVA_HOME)/include;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;NATIVE_EXPORTS;%(PreprocessorDefinitions) + true + $(JAVA_HOME)/include/win32;$(JAVA_HOME)/include;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;NATIVE_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;NATIVE_EXPORTS;%(PreprocessorDefinitions) + true + $(JAVA_HOME)/include/win32;$(JAVA_HOME)/include;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;NATIVE_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;NATIVE_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;NATIVE_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;NATIVE_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;NATIVE_EXPORTS;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + + + + + + + + + + false + false + + + + + false + false + false + false + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/WindowsMonitor/Native/Native.vcxproj.filters b/WindowsMonitor/Native/Native.vcxproj.filters new file mode 100644 index 00000000..64a6738e --- /dev/null +++ b/WindowsMonitor/Native/Native.vcxproj.filters @@ -0,0 +1,45 @@ +锘 + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + 澶存枃浠 + + + 澶存枃浠 + + + 澶存枃浠 + + + 澶存枃浠 + + + 澶存枃浠 + + + + + 婧愭枃浠 + + + 婧愭枃浠 + + + 婧愭枃浠 + + + \ No newline at end of file diff --git a/WindowsMonitor/Native/Native.vcxproj.user b/WindowsMonitor/Native/Native.vcxproj.user new file mode 100644 index 00000000..a375ae35 --- /dev/null +++ b/WindowsMonitor/Native/Native.vcxproj.user @@ -0,0 +1,4 @@ +锘 + + + \ No newline at end of file diff --git a/WindowsMonitor/Native/dllmain.cpp b/WindowsMonitor/Native/dllmain.cpp new file mode 100644 index 00000000..260abc6d --- /dev/null +++ b/WindowsMonitor/Native/dllmain.cpp @@ -0,0 +1,19 @@ +// dllmain.cpp : 定义 DLL 应用程序的入口点。 +#include "stdafx.h" + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + diff --git a/WindowsMonitor/Native/stdafx.cpp b/WindowsMonitor/Native/stdafx.cpp new file mode 100644 index 00000000..8068505a --- /dev/null +++ b/WindowsMonitor/Native/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : 只包括标准包含文件的源文件 +// Native.pch 将作为预编译头 +// stdafx.obj 将包含预编译类型信息 + +#include "stdafx.h" + +// TODO: 在 STDAFX.H 中 +// 引用任何所需的附加头文件,而不是在此文件中引用 diff --git a/WindowsMonitor/Native/stdafx.h b/WindowsMonitor/Native/stdafx.h new file mode 100644 index 00000000..4d187e68 --- /dev/null +++ b/WindowsMonitor/Native/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : 标准系统包含文件的包含文件, +// 或是经常使用但不常更改的 +// 特定于项目的包含文件 +// + +#pragma once + +#include "targetver.h" + +#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息 +// Windows 头文件: +#include + +#include +#include "JNITest.h" \ No newline at end of file diff --git a/WindowsMonitor/Native/targetver.h b/WindowsMonitor/Native/targetver.h new file mode 100644 index 00000000..7a7d2c83 --- /dev/null +++ b/WindowsMonitor/Native/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。 + +// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将 +// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。 + +#include diff --git a/WindowsMonitor/WindowsMonitor.sln b/WindowsMonitor/WindowsMonitor.sln new file mode 100644 index 00000000..ad89aa0c --- /dev/null +++ b/WindowsMonitor/WindowsMonitor.sln @@ -0,0 +1,36 @@ +锘 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Monitor", "Monitor\Monitor.vcxproj", "{200C95C6-D4F1-47CF-8178-11EF1C3B61B1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Native", "Native\Native.vcxproj", "{286E6C20-9603-4870-BD34-FF54406AE1DC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {200C95C6-D4F1-47CF-8178-11EF1C3B61B1}.Debug|Win32.ActiveCfg = Debug|Win32 + {200C95C6-D4F1-47CF-8178-11EF1C3B61B1}.Debug|Win32.Build.0 = Debug|Win32 + {200C95C6-D4F1-47CF-8178-11EF1C3B61B1}.Debug|x64.ActiveCfg = Debug|x64 + {200C95C6-D4F1-47CF-8178-11EF1C3B61B1}.Debug|x64.Build.0 = Debug|x64 + {200C95C6-D4F1-47CF-8178-11EF1C3B61B1}.Release|Win32.ActiveCfg = Release|Win32 + {200C95C6-D4F1-47CF-8178-11EF1C3B61B1}.Release|Win32.Build.0 = Release|Win32 + {200C95C6-D4F1-47CF-8178-11EF1C3B61B1}.Release|x64.ActiveCfg = Release|x64 + {200C95C6-D4F1-47CF-8178-11EF1C3B61B1}.Release|x64.Build.0 = Release|x64 + {286E6C20-9603-4870-BD34-FF54406AE1DC}.Debug|Win32.ActiveCfg = Debug|Win32 + {286E6C20-9603-4870-BD34-FF54406AE1DC}.Debug|Win32.Build.0 = Debug|Win32 + {286E6C20-9603-4870-BD34-FF54406AE1DC}.Debug|x64.ActiveCfg = Debug|x64 + {286E6C20-9603-4870-BD34-FF54406AE1DC}.Debug|x64.Build.0 = Debug|x64 + {286E6C20-9603-4870-BD34-FF54406AE1DC}.Release|Win32.ActiveCfg = Release|Win32 + {286E6C20-9603-4870-BD34-FF54406AE1DC}.Release|Win32.Build.0 = Release|Win32 + {286E6C20-9603-4870-BD34-FF54406AE1DC}.Release|x64.ActiveCfg = Release|x64 + {286E6C20-9603-4870-BD34-FF54406AE1DC}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/WindowsMonitor/WindowsMonitor.v11.suo b/WindowsMonitor/WindowsMonitor.v11.suo new file mode 100644 index 0000000000000000000000000000000000000000..507b3e09a25f64d30c3ad7367b4d09ca49c9f0d4 GIT binary patch literal 46592 zcmeHQ3wRvWbspIm47LHglq5hvF^*$E+N`XHA6Q^%CE3Q3Z7f+Pt{So0ot4*K?JB#o zM#d(Dgp}402+yR165|j;DGi~afzpP!Kp=$jD8*@^q#w|hK$0(|=|`byiu?a_=Xz&n zXLn}yp_R?v{m$Nb+_~pI&OP_sbIzT4{<*oY-f{mauPK&ro-$o||KPF8(WdKlreozq zMOlpVX@K_+9z4ifypO|LIE-3gqmsZ+Q|gs&C5||$>||HE4ks%!4)ysd4o|)P?y7&A zap|*ltw^{3Jdt<ISkB~ zD1Ay0$3bOOQBf+NvO&KW$5~kE!IhvghU1j+q=?#-X?4Uu8>fu3Zss}pCtPQGh5_Ih z2PR@n;W&jpP*I8y{<{D>lqSWmoFfw3{GSc{GjN@_8Elf|T$1CJH~fJA6OU&7GtErg zI~H&fpb>B!U=Cm%U=twg0psM8rt3Z&uQ#1D3G+S8a*fwNWOI$zt>L3c*8-RYU|#c$ z=g6m+_87!%fF*#XfMtN?fDV8)FL@p??sXyV2J`?{0agRn04@Nm1@r>?0PMRD0|o&y z4|Cjr>ze@=0X_vd9$>ydm5wKK{EzQhUK{_Qg{d_DB`r!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>hWxH4mHo)?grG9CO+@hP(O$-!bKBy{41`ewPY~X zP`@EP5{rh`syhb~+tqmch`%|~8d(x)Y6`ddgU!L&(}9W^&=pQ*Z_eS0I1(Y)1t3>`X^vVQZ2zRtyA_qpBv~WoW(6?axQetgFlS zmc$I*Sl_>BeM=%qLe5=o-oNNRXEuB8`xobO023+RzgW!o51A{oSW}jFXion37v-=E zCoVbk#m4M4QQ`Fqs(z@ycr1hLLwU~F?X}E)RAG}4?;x??lP~kH$scl#ugM?w-|DfK zh^D^$k)u-=!nPs*OZh{N0~xy=YaIVmL;fh{`%58Re2{gPv6nSSP5u~+rqaP!zm^V1 r6F$>)T9ZE}TmBfrUL$@DBB`%1w%`kjTvZfae~{*fuyeB5^~e7M)-gVK literal 0 HcmV?d00001 diff --git a/src/main/java/org/bench4q/monitor/JNITest.java b/src/main/java/org/bench4q/monitor/JNITest.java new file mode 100644 index 00000000..4e465d86 --- /dev/null +++ b/src/main/java/org/bench4q/monitor/JNITest.java @@ -0,0 +1,15 @@ +package org.bench4q.monitor; + +public class JNITest { + static { + String path = Thread.currentThread().getContextClassLoader() + .getResource("Native.dll").getFile(); + System.load(path); + } + + public native int add(int a, int b); + + public static void main(String[] args) { + System.out.println(new JNITest().add(1, 2)); + } +}