[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cinvoke-svn] r82 - in trunk/cinvoke: . bindings/java
From: |
will |
Subject: |
[cinvoke-svn] r82 - in trunk/cinvoke: . bindings/java |
Date: |
8 Jul 2006 16:24:05 -0400 |
Author: will
Date: 2006-07-08 16:24:04 -0400 (Sat, 08 Jul 2006)
New Revision: 82
Added:
trunk/cinvoke/bindings/java/Win32Test.java
trunk/cinvoke/bindings/java/cinvoke_java.sln
trunk/cinvoke/bindings/java/cinvoke_java.vcproj
Modified:
trunk/cinvoke/README.txt
trunk/cinvoke/bindings/java/org_cinvoke_Natives.cpp
Log:
win32 java fix
Modified: trunk/cinvoke/README.txt
===================================================================
--- trunk/cinvoke/README.txt 2006-07-08 15:35:44 UTC (rev 81)
+++ trunk/cinvoke/README.txt 2006-07-08 20:24:04 UTC (rev 82)
@@ -14,3 +14,7 @@
available platforms, then run it again to create the Makefiles. Then
enter 'make', then edit the top-level Makefile to change the install path
if neccessary, and enter 'make install'.
+
+The language bindings in the bindings/ directory require the library
+to be installed in order to build; their Makefiles are not set up to build
+from C/Invoke compiled in the source directory.
Added: trunk/cinvoke/bindings/java/Win32Test.java
===================================================================
--- trunk/cinvoke/bindings/java/Win32Test.java (rev 0)
+++ trunk/cinvoke/bindings/java/Win32Test.java 2006-07-08 20:24:04 UTC (rev 82)
@@ -0,0 +1,18 @@
+import org.cinvoke.*;
+
+class Win32Test {
+ interface User32 {
+ public NativeInt GetSystemMetrics(NativeInt nIndex);
+ }
+
+ private static final NativeInt SM_CXSCREEN = new NativeInt(0);
+ private static final NativeInt SM_CYSCREEN = new NativeInt(1);
+
+ public static void main(String[] args) {
+ User32 u = (User32)CInvoke.load("User32.dll", User32.class,
CInvoke.CC.STDCALL);
+
+ System.out.println("Your monitor resolution is " +
+ u.GetSystemMetrics(SM_CXSCREEN) + "x" +
u.GetSystemMetrics(SM_CYSCREEN));
+ }
+}
+
Added: trunk/cinvoke/bindings/java/cinvoke_java.sln
===================================================================
--- trunk/cinvoke/bindings/java/cinvoke_java.sln
(rev 0)
+++ trunk/cinvoke/bindings/java/cinvoke_java.sln 2006-07-08 20:24:04 UTC
(rev 82)
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cinvoke_java",
"cinvoke_java.vcproj", "{97F1B27E-51EE-4FA0-B24C-9361F3132DAE}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {97F1B27E-51EE-4FA0-B24C-9361F3132DAE}.Debug.ActiveCfg =
Debug|Win32
+ {97F1B27E-51EE-4FA0-B24C-9361F3132DAE}.Debug.Build.0 =
Debug|Win32
+ {97F1B27E-51EE-4FA0-B24C-9361F3132DAE}.Release.ActiveCfg =
Release|Win32
+ {97F1B27E-51EE-4FA0-B24C-9361F3132DAE}.Release.Build.0 =
Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
Added: trunk/cinvoke/bindings/java/cinvoke_java.vcproj
===================================================================
--- trunk/cinvoke/bindings/java/cinvoke_java.vcproj
(rev 0)
+++ trunk/cinvoke/bindings/java/cinvoke_java.vcproj 2006-07-08 20:24:04 UTC
(rev 82)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="cinvoke_java"
+ ProjectGUID="{97F1B27E-51EE-4FA0-B24C-9361F3132DAE}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+
AdditionalIncludeDirectories="..\..\lib;C:\j2sdk1.4.2_12\include;C:\j2sdk1.4.2_12\include\win32"
+
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CINVOKE_JAVA_EXPORTS;ARCH_CL_X86_WIN;CINVOKE_BUILD"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="cinvoke.lib"
+ OutputFile="$(OutDir)/cinvoke_java.dll"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="..\..\lib\Debug"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/cinvoke_java.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/cinvoke_java.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+
AdditionalIncludeDirectories="..\..\lib;C:\j2sdk1.4.2_12\include;C:\j2sdk1.4.2_12\include\win32"
+
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CINVOKE_JAVA_EXPORTS;ARCH_CL_X86_WIN;CINVOKE_BUILD"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="cinvoke.lib"
+ OutputFile="$(OutDir)/cinvoke_java.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="..\..\lib\Release"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)/cinvoke_java.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\org_cinvoke_Natives.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath=".\org_cinvoke_Natives.h">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: trunk/cinvoke/bindings/java/org_cinvoke_Natives.cpp
===================================================================
--- trunk/cinvoke/bindings/java/org_cinvoke_Natives.cpp 2006-07-08 15:35:44 UTC
(rev 81)
+++ trunk/cinvoke/bindings/java/org_cinvoke_Natives.cpp 2006-07-08 20:24:04 UTC
(rev 82)
@@ -557,7 +557,7 @@
u->ref = ref;
u->numparms = numparms;
u->rettype = rettype;
- u->hasretval = hasret;
+ u->hasretval = hasret?true:false;
u->ptypes = typearr;
u->pclasses = clsarr;
return (jlong)cinv_callback_create(ctx, func, u, cbfunc);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cinvoke-svn] r82 - in trunk/cinvoke: . bindings/java,
will <=