mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
Bug 459971 Windows native for Serial Port.
Not checking the binaries in until I get closer to the end. Still some API changes I want to make to do more buffering. Done as a Visual Studio 2013 project. I also brough winreg into that sln file as I though I had to make a change in it but didn't in the end. But really should bring them all. Change-Id: I6e7d472763381cdc0ae558d8cd63993bb0460457 Signed-off-by: Doug Schaefer <dschaefer@qnx.com>
This commit is contained in:
parent
3ad1ac66cf
commit
6bd7355e47
25 changed files with 983 additions and 184 deletions
|
@ -17,6 +17,7 @@ public class Messages extends NLS {
|
||||||
public static String Util_exception_cannotSetTerminalSize;
|
public static String Util_exception_cannotSetTerminalSize;
|
||||||
public static String Util_error_cannotRun;
|
public static String Util_error_cannotRun;
|
||||||
public static String Util_exception_closeError;
|
public static String Util_exception_closeError;
|
||||||
|
public static String SerialPort_PORT_IS_OPEN;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize resource bundle.
|
// Initialize resource bundle.
|
||||||
|
|
|
@ -14,3 +14,4 @@ Util_exception_cannotCreatePty=Cannot create pty
|
||||||
Util_exception_closeError=close error
|
Util_exception_closeError=close error
|
||||||
Util_exception_cannotSetTerminalSize=Setting terminal size is not supported
|
Util_exception_cannotSetTerminalSize=Setting terminal size is not supported
|
||||||
Util_error_cannotRun=Cannot run program "{0}": {1}
|
Util_error_cannotRun=Cannot run program "{0}": {1}
|
||||||
|
SerialPort_PORT_IS_OPEN=Port is open
|
||||||
|
|
|
@ -15,7 +15,6 @@ package org.eclipse.cdt.utils.serial;
|
||||||
*/
|
*/
|
||||||
public enum BaudRate {
|
public enum BaudRate {
|
||||||
|
|
||||||
B0(0),
|
|
||||||
B50(50),
|
B50(50),
|
||||||
B75(75),
|
B75(75),
|
||||||
B110(110),
|
B110(110),
|
||||||
|
|
|
@ -15,8 +15,12 @@ import java.io.FilenameFilter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.internal.core.natives.Messages;
|
||||||
|
import org.eclipse.cdt.utils.WindowsRegistry;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,7 +36,8 @@ public class SerialPort {
|
||||||
private StopBits stopBits = StopBits.S1;
|
private StopBits stopBits = StopBits.S1;
|
||||||
private long handle;
|
private long handle;
|
||||||
|
|
||||||
private static final String PORT_OPEN = "Port is open";
|
private static final String SERIAL_KEY = "HARDWARE\\DEVICEMAP\\SERIALCOMM"; //$NON-NLS-1$
|
||||||
|
private static final String PORT_OPEN = Messages.SerialPort_PORT_IS_OPEN;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
System.loadLibrary("serial"); //$NON-NLS-1$
|
System.loadLibrary("serial"); //$NON-NLS-1$
|
||||||
|
@ -71,6 +76,22 @@ public class SerialPort {
|
||||||
names[i] = files[i].getAbsolutePath();
|
names[i] = files[i].getAbsolutePath();
|
||||||
}
|
}
|
||||||
return names;
|
return names;
|
||||||
|
} else if (Platform.getOS().equals(Platform.OS_WIN32)) {
|
||||||
|
WindowsRegistry reg = WindowsRegistry.getRegistry();
|
||||||
|
if (reg != null) {
|
||||||
|
List<String> ports = new ArrayList<>();
|
||||||
|
int i = 0;
|
||||||
|
String name = reg.getLocalMachineValueName(SERIAL_KEY, i);
|
||||||
|
while (name != null) {
|
||||||
|
String value = reg.getLocalMachineValue(SERIAL_KEY, name);
|
||||||
|
ports.add(value);
|
||||||
|
i++;
|
||||||
|
name = reg.getLocalMachineValueName(SERIAL_KEY, i);
|
||||||
|
}
|
||||||
|
return ports.toArray(new String[ports.size()]);
|
||||||
|
} else {
|
||||||
|
return new String[0];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return new String[0];
|
return new String[0];
|
||||||
}
|
}
|
||||||
|
@ -95,6 +116,7 @@ public class SerialPort {
|
||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
close0(handle);
|
close0(handle);
|
||||||
isOpen = false;
|
isOpen = false;
|
||||||
|
handle = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void close0(long handle) throws IOException;
|
private native void close0(long handle) throws IOException;
|
||||||
|
@ -136,7 +158,7 @@ public class SerialPort {
|
||||||
return parity;
|
return parity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStopBit(StopBits stopBits) throws IOException {
|
public void setStopBits(StopBits stopBits) throws IOException {
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
throw new IOException(PORT_OPEN);
|
throw new IOException(PORT_OPEN);
|
||||||
}
|
}
|
||||||
|
|
4
core/org.eclipse.cdt.core.win32.x86/os/win32/x86/.gitignore
vendored
Normal file
4
core/org.eclipse.cdt.core.win32.x86/os/win32/x86/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
*.exp
|
||||||
|
*.lib
|
||||||
|
*.pdb
|
||||||
|
|
4
core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/.gitignore
vendored
Normal file
4
core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
*.exp
|
||||||
|
*.lib
|
||||||
|
*.pdb
|
||||||
|
|
8
core/org.eclipse.cdt.core.win32/library/.gitignore
vendored
Normal file
8
core/org.eclipse.cdt.core.win32/library/.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
/ipch/
|
||||||
|
*.obj
|
||||||
|
*.idb
|
||||||
|
*.pdb
|
||||||
|
*.sdf
|
||||||
|
*.suo
|
||||||
|
*.pch
|
||||||
|
*.log
|
47
core/org.eclipse.cdt.core.win32/library/cdt-win32.sln
Normal file
47
core/org.eclipse.cdt.core.win32/library/cdt-win32.sln
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2013
|
||||||
|
VisualStudioVersion = 12.0.31101.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "serial", "serial\serial.vcxproj", "{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winreg", "winreg\winreg.vcxproj", "{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Release|Mixed Platforms = Release|Mixed Platforms
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
|
{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
|
{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}.Release|x64.Build.0 = Release|x64
|
||||||
|
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
|
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
|
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Debug|x64.ActiveCfg = Debug|Win32
|
||||||
|
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}.Release|x64.Build.0 = Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
2
core/org.eclipse.cdt.core.win32/library/serial/.gitignore
vendored
Normal file
2
core/org.eclipse.cdt.core.win32/library/serial/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/serial.tlog/
|
||||||
|
/serial.vcxproj.user
|
28
core/org.eclipse.cdt.core.win32/library/serial/dllmain.cpp
Normal file
28
core/org.eclipse.cdt.core.win32/library/serial/dllmain.cpp
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
#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;
|
||||||
|
}
|
||||||
|
|
149
core/org.eclipse.cdt.core.win32/library/serial/serial.cpp
Normal file
149
core/org.eclipse.cdt.core.win32/library/serial/serial.cpp
Normal file
|
@ -0,0 +1,149 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
JNIEXPORT jlong JNICALL Java_org_eclipse_cdt_utils_serial_SerialPort_open0
|
||||||
|
(JNIEnv *env, jobject jobj, jstring portName, jint baudRate, jint byteSize, jint parity, jint stopBits)
|
||||||
|
{
|
||||||
|
const wchar_t * cportName = (const wchar_t *) env->GetStringChars(portName, NULL);
|
||||||
|
HANDLE handle = CreateFile(cportName,
|
||||||
|
GENERIC_READ | GENERIC_WRITE,
|
||||||
|
0,
|
||||||
|
NULL,
|
||||||
|
OPEN_EXISTING,
|
||||||
|
FILE_FLAG_OVERLAPPED,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
if (handle != INVALID_HANDLE_VALUE) {
|
||||||
|
DCB dcb = { 0 };
|
||||||
|
|
||||||
|
if (!GetCommState(handle, &dcb)) {
|
||||||
|
fprintf(stderr, "Error getting DCB: %S\n", cportName);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
dcb.BaudRate = baudRate;
|
||||||
|
dcb.ByteSize = (BYTE) byteSize;
|
||||||
|
|
||||||
|
switch (parity) {
|
||||||
|
case 0: // None
|
||||||
|
dcb.fParity = FALSE;
|
||||||
|
break;
|
||||||
|
case 1: // Even
|
||||||
|
dcb.fParity = TRUE;
|
||||||
|
dcb.Parity = EVENPARITY;
|
||||||
|
break;
|
||||||
|
case 2: // Odd
|
||||||
|
dcb.fParity = TRUE;
|
||||||
|
dcb.Parity = ODDPARITY;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (stopBits) {
|
||||||
|
case 0:
|
||||||
|
dcb.StopBits = ONESTOPBIT;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
dcb.StopBits = TWOSTOPBITS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!SetCommState(handle, &dcb)) {
|
||||||
|
fprintf(stderr, "Error setting DCB: %S\n", cportName);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (jlong) handle;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
JNIEXPORT void JNICALL Java_org_eclipse_cdt_utils_serial_SerialPort_close0
|
||||||
|
(JNIEnv *env, jobject jobj, jlong handle)
|
||||||
|
{
|
||||||
|
CloseHandle((HANDLE) handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_serial_SerialPort_read0
|
||||||
|
(JNIEnv *env, jobject jobj, jlong jhandle)
|
||||||
|
{
|
||||||
|
OVERLAPPED olp = { 0 };
|
||||||
|
|
||||||
|
olp.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||||
|
if (olp.hEvent == NULL) {
|
||||||
|
fprintf(stderr, "Error creating event\n");
|
||||||
|
fflush(stderr);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
char buff;
|
||||||
|
DWORD nwritten;
|
||||||
|
HANDLE handle = (HANDLE)jhandle;
|
||||||
|
|
||||||
|
if (!ReadFile(handle, &buff, sizeof(buff), &nwritten, &olp)) {
|
||||||
|
if (GetLastError() != ERROR_IO_PENDING) {
|
||||||
|
fprintf(stderr, "Error reading from port: %d\n", GetLastError());
|
||||||
|
fflush(stderr);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
switch (WaitForSingleObject(olp.hEvent, INFINITE)) {
|
||||||
|
case WAIT_OBJECT_0:
|
||||||
|
if (!GetOverlappedResult(handle, &olp, &nwritten, FALSE)) {
|
||||||
|
if (GetLastError() != ERROR_OPERATION_ABORTED) {
|
||||||
|
fprintf(stderr, "Error waiting for read: %d\n", GetLastError());
|
||||||
|
fflush(stderr);
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CloseHandle(olp.hEvent);
|
||||||
|
return buff;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
JNIEXPORT void JNICALL Java_org_eclipse_cdt_utils_serial_SerialPort_write0
|
||||||
|
(JNIEnv *env, jobject jobj, jlong jhandle, jint b)
|
||||||
|
{
|
||||||
|
OVERLAPPED olp = { 0 };
|
||||||
|
|
||||||
|
olp.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||||
|
if (olp.hEvent == NULL) {
|
||||||
|
fprintf(stderr, "Error creating event\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
char buff = (char) b;
|
||||||
|
DWORD nwritten;
|
||||||
|
HANDLE handle = (HANDLE) jhandle;
|
||||||
|
|
||||||
|
if (!WriteFile(handle, &buff, sizeof(buff), &nwritten, &olp)) {
|
||||||
|
if (GetLastError() != ERROR_IO_PENDING) {
|
||||||
|
fprintf(stderr, "Error writing to port\n");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
switch (WaitForSingleObject(olp.hEvent, INFINITE)) {
|
||||||
|
case WAIT_OBJECT_0:
|
||||||
|
if (!GetOverlappedResult(handle, &olp, &nwritten, FALSE)) {
|
||||||
|
fprintf(stderr, "Error waiting for write\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CloseHandle(olp.hEvent);
|
||||||
|
}
|
180
core/org.eclipse.cdt.core.win32/library/serial/serial.vcxproj
Normal file
180
core/org.eclipse.cdt.core.win32/library/serial/serial.vcxproj
Normal file
|
@ -0,0 +1,180 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{2E2DB53A-62BE-4690-8FCB-209885DD9B3C}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>serial</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>$(SolutionDir)..\..\org.eclipse.cdt.core.win32.x86\os\win32\x86\</OutDir>
|
||||||
|
<IntDir />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>$(SolutionDir)..\..\org.eclipse.cdt.core.win32.x86_64\os\win32\x86_64\</OutDir>
|
||||||
|
<IntDir />
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SERIAL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SERIAL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SERIAL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<AdditionalIncludeDirectories>C:\Program Files\Java\jdk1.8.0_31\include;C:\Program Files\Java\jdk1.8.0_31\include\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SERIAL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Program Files\Java\jdk1.8.0_31\include;C:\Program Files\Java\jdk1.8.0_31\include\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="stdafx.h" />
|
||||||
|
<ClInclude Include="targetver.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="dllmain.cpp">
|
||||||
|
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
||||||
|
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
||||||
|
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="serial.cpp" />
|
||||||
|
<ClCompile Include="stdafx.cpp">
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="stdafx.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="targetver.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="stdafx.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="serial.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="dllmain.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
14
core/org.eclipse.cdt.core.win32/library/serial/stdafx.cpp
Normal file
14
core/org.eclipse.cdt.core.win32/library/serial/stdafx.cpp
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
// TODO: reference any additional headers you need in STDAFX.H
|
||||||
|
// and not in this file
|
22
core/org.eclipse.cdt.core.win32/library/serial/stdafx.h
Normal file
22
core/org.eclipse.cdt.core.win32/library/serial/stdafx.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "targetver.h"
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
// Windows Header Files:
|
||||||
|
#include <windows.h>
|
||||||
|
#include <jni.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: reference additional headers your program requires here
|
18
core/org.eclipse.cdt.core.win32/library/serial/targetver.h
Normal file
18
core/org.eclipse.cdt.core.win32/library/serial/targetver.h
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// Including SDKDDKVer.h defines the highest available Windows platform.
|
||||||
|
|
||||||
|
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
|
||||||
|
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
||||||
|
|
||||||
|
#include <SDKDDKVer.h>
|
1
core/org.eclipse.cdt.core.win32/library/winreg/.gitignore
vendored
Normal file
1
core/org.eclipse.cdt.core.win32/library/winreg/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/winreg.tlog/
|
|
@ -1,28 +0,0 @@
|
||||||
ifeq ($(JAVA_HOME),)
|
|
||||||
$(error JAVA_HOME not set in environment)
|
|
||||||
endif
|
|
||||||
|
|
||||||
TARGET = $(INSTALL_DIR)/winreg.dll
|
|
||||||
|
|
||||||
OBJS = winreg.o
|
|
||||||
|
|
||||||
OS = win32
|
|
||||||
ARCH = x86
|
|
||||||
|
|
||||||
JDK_INCLUDES = "$(JAVA_HOME)/include"
|
|
||||||
JDK_OS_INCLUDES = "$(JAVA_HOME)/include/$(OS)"
|
|
||||||
|
|
||||||
CXX = g++
|
|
||||||
CXXFLAGS = -DUNICODE -I$(JDK_INCLUDES) -I$(JDK_OS_INCLUDES)
|
|
||||||
|
|
||||||
INSTALL_DIR = ../../../org.eclipse.cdt.core.$(OS).$(ARCH)/os/$(OS)/$(ARCH)
|
|
||||||
|
|
||||||
all: $(TARGET)
|
|
||||||
|
|
||||||
rebuild: clean all
|
|
||||||
|
|
||||||
clean :
|
|
||||||
$(RM) $(OBJS)
|
|
||||||
|
|
||||||
$(TARGET) : $(OBJS)
|
|
||||||
$(CXX) -Wl,--kill-at -shared -o $(TARGET) $(OBJS)
|
|
28
core/org.eclipse.cdt.core.win32/library/winreg/dllmain.cpp
Normal file
28
core/org.eclipse.cdt.core.win32/library/winreg/dllmain.cpp
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
#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;
|
||||||
|
}
|
||||||
|
|
14
core/org.eclipse.cdt.core.win32/library/winreg/stdafx.cpp
Normal file
14
core/org.eclipse.cdt.core.win32/library/winreg/stdafx.cpp
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
// TODO: reference any additional headers you need in STDAFX.H
|
||||||
|
// and not in this file
|
22
core/org.eclipse.cdt.core.win32/library/winreg/stdafx.h
Normal file
22
core/org.eclipse.cdt.core.win32/library/winreg/stdafx.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "targetver.h"
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
// Windows Header Files:
|
||||||
|
#include <windows.h>
|
||||||
|
#include <jni.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: reference additional headers your program requires here
|
18
core/org.eclipse.cdt.core.win32/library/winreg/targetver.h
Normal file
18
core/org.eclipse.cdt.core.win32/library/winreg/targetver.h
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 QNX Software Systems and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// Including SDKDDKVer.h defines the highest available Windows platform.
|
||||||
|
|
||||||
|
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
|
||||||
|
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
||||||
|
|
||||||
|
#include <SDKDDKVer.h>
|
|
@ -1,153 +1,151 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2007 QNX Software Systems
|
* Copyright (c) 2015 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* QNX Software Systems - initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#include <windows.h>
|
#include "stdafx.h"
|
||||||
#include <jni.h>
|
|
||||||
#include <string.h>
|
static jstring getValue(JNIEnv * env, HKEY key, jstring subkey, jstring name) {
|
||||||
|
const jchar * csubkey = env->GetStringChars(subkey, NULL);
|
||||||
static jstring getValue(JNIEnv * env, HKEY key, jstring subkey, jstring name) {
|
const jchar * cname = env->GetStringChars(name, NULL);
|
||||||
const jchar * csubkey = env->GetStringChars(subkey, NULL);
|
jstring result = NULL;
|
||||||
const jchar * cname = env->GetStringChars(name, NULL);
|
|
||||||
jstring result = NULL;
|
HKEY skey;
|
||||||
|
LONG rc = RegOpenKeyEx(key, (const wchar_t *)csubkey, 0, KEY_READ, &skey);
|
||||||
HKEY skey;
|
if (rc == ERROR_SUCCESS) {
|
||||||
LONG rc = RegOpenKeyEx(key, (const wchar_t *)csubkey, 0, KEY_READ, &skey);
|
DWORD type;
|
||||||
if (rc == ERROR_SUCCESS) {
|
wchar_t buffer[256];
|
||||||
DWORD type;
|
DWORD len = sizeof(buffer);
|
||||||
wchar_t buffer[256];
|
rc = RegQueryValueEx(skey, (const wchar_t *)cname, NULL, &type, (BYTE *)&buffer, &len);
|
||||||
DWORD len = sizeof(buffer);
|
if (rc == ERROR_SUCCESS) {
|
||||||
rc = RegQueryValueEx(skey, (const wchar_t *)cname, NULL, &type, (BYTE *)&buffer, &len);
|
result = env->NewString((jchar *) buffer, (jsize) wcslen(buffer));
|
||||||
if (rc == ERROR_SUCCESS) {
|
}
|
||||||
result = env->NewString((jchar *)buffer, wcslen(buffer));
|
RegCloseKey(skey);
|
||||||
}
|
}
|
||||||
RegCloseKey(skey);
|
|
||||||
}
|
env->ReleaseStringChars(subkey, csubkey);
|
||||||
|
env->ReleaseStringChars(name, cname);
|
||||||
env->ReleaseStringChars(subkey, csubkey);
|
|
||||||
env->ReleaseStringChars(name, cname);
|
return result;
|
||||||
|
}
|
||||||
return result;
|
|
||||||
}
|
extern "C"
|
||||||
|
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getLocalMachineValue(
|
||||||
extern "C"
|
JNIEnv * env, jobject obj, jstring subkey, jstring name)
|
||||||
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getLocalMachineValue(
|
{
|
||||||
JNIEnv * env, jobject obj, jstring subkey, jstring name)
|
return getValue(env, HKEY_LOCAL_MACHINE, subkey, name);
|
||||||
{
|
}
|
||||||
return getValue(env, HKEY_LOCAL_MACHINE, subkey, name);
|
|
||||||
}
|
extern "C"
|
||||||
|
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getCurrentUserValue(
|
||||||
extern "C"
|
JNIEnv * env, jobject obj, jstring subkey, jstring name)
|
||||||
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getCurrentUserValue(
|
{
|
||||||
JNIEnv * env, jobject obj, jstring subkey, jstring name)
|
return getValue(env, HKEY_CURRENT_USER, subkey, name);
|
||||||
{
|
}
|
||||||
return getValue(env, HKEY_CURRENT_USER, subkey, name);
|
|
||||||
}
|
/*
|
||||||
|
* Given a subkey (string) under HKEY_LOCAL_MACHINE, and an index (starting from 0)
|
||||||
/*
|
* to the key's array of values, return the name of the indexed value.
|
||||||
* Given a subkey (string) under HKEY_LOCAL_MACHINE, and an index (starting from 0)
|
* The return value is null on any error or when the index is invalid.
|
||||||
* to the key's array of values, return the name of the indexed value.
|
*/
|
||||||
* The return value is null on any error or when the index is invalid.
|
|
||||||
*/
|
static jstring getValueName(JNIEnv * env, HKEY key, jstring subkey, jint index) {
|
||||||
|
const jchar * csubkey = env->GetStringChars(subkey, NULL);
|
||||||
static jstring getValueName(JNIEnv * env, HKEY key, jstring subkey, jint index) {
|
jstring result = NULL;
|
||||||
const jchar * csubkey = env->GetStringChars(subkey, NULL);
|
|
||||||
jstring result = NULL;
|
HKEY skey;
|
||||||
|
LONG rc = RegOpenKeyEx(key, (const wchar_t *)csubkey, 0, KEY_READ, &skey);
|
||||||
HKEY skey;
|
if (rc != ERROR_SUCCESS)
|
||||||
LONG rc = RegOpenKeyEx(key, (const wchar_t *)csubkey, 0, KEY_READ, &skey);
|
return NULL;
|
||||||
if (rc != ERROR_SUCCESS)
|
|
||||||
return NULL;
|
wchar_t valueName[256];
|
||||||
|
DWORD nameSize = sizeof(valueName) + 2;
|
||||||
wchar_t valueName[256];
|
|
||||||
DWORD nameSize = sizeof(valueName) + 2;
|
rc = RegEnumValue(skey, index,
|
||||||
|
valueName, // UNICODE string
|
||||||
rc = RegEnumValue(skey, index,
|
&nameSize,
|
||||||
valueName, // UNICODE string
|
NULL, NULL,
|
||||||
&nameSize,
|
NULL, // data string
|
||||||
NULL, NULL,
|
NULL); // size in BYTE of data.
|
||||||
NULL, // data string
|
|
||||||
NULL); // size in BYTE of data.
|
if (rc == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
if (rc == ERROR_SUCCESS)
|
result = env->NewString((jchar *)valueName, nameSize);
|
||||||
{
|
}
|
||||||
result = env->NewString((jchar *)valueName, nameSize);
|
|
||||||
}
|
RegCloseKey(skey);
|
||||||
|
|
||||||
RegCloseKey(skey);
|
env->ReleaseStringChars(subkey, csubkey);
|
||||||
|
|
||||||
env->ReleaseStringChars(subkey, csubkey);
|
return result;
|
||||||
|
}
|
||||||
return result;
|
|
||||||
}
|
extern "C"
|
||||||
|
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getLocalMachineValueName(
|
||||||
extern "C"
|
JNIEnv * env, jobject obj, jstring subkey, jint index)
|
||||||
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getLocalMachineValueName(
|
{
|
||||||
JNIEnv * env, jobject obj, jstring subkey, jint index)
|
return getValueName(env, HKEY_LOCAL_MACHINE, subkey, index);
|
||||||
{
|
}
|
||||||
return getValueName(env, HKEY_LOCAL_MACHINE, subkey, index);
|
|
||||||
}
|
extern "C"
|
||||||
|
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getCurrentUserValueName(
|
||||||
extern "C"
|
JNIEnv * env, jobject obj, jstring subkey, jint index)
|
||||||
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getCurrentUserValueName(
|
{
|
||||||
JNIEnv * env, jobject obj, jstring subkey, jint index)
|
return getValueName(env, HKEY_CURRENT_USER, subkey, index);
|
||||||
{
|
}
|
||||||
return getValueName(env, HKEY_CURRENT_USER, subkey, index);
|
|
||||||
}
|
/*
|
||||||
|
* Given a subkey (string) under HKEY_LOCAL_MACHINE, and an index (starting from 0)
|
||||||
/*
|
* to the key's array of keys, return the name of the indexed key.
|
||||||
* Given a subkey (string) under HKEY_LOCAL_MACHINE, and an index (starting from 0)
|
* The return value is null on any error or when the index is invalid.
|
||||||
* to the key's array of keys, return the name of the indexed key.
|
*/
|
||||||
* The return value is null on any error or when the index is invalid.
|
|
||||||
*/
|
static jstring getKeyName(JNIEnv * env, HKEY key, jstring subkey, jint index) {
|
||||||
|
const jchar * csubkey = env->GetStringChars(subkey, NULL);
|
||||||
static jstring getKeyName(JNIEnv * env, HKEY key, jstring subkey, jint index) {
|
jstring result = NULL;
|
||||||
const jchar * csubkey = env->GetStringChars(subkey, NULL);
|
|
||||||
jstring result = NULL;
|
HKEY skey;
|
||||||
|
LONG rc = RegOpenKeyEx(key, (const wchar_t *)csubkey, 0, KEY_READ, &skey);
|
||||||
HKEY skey;
|
if (rc != ERROR_SUCCESS)
|
||||||
LONG rc = RegOpenKeyEx(key, (const wchar_t *)csubkey, 0, KEY_READ, &skey);
|
return NULL;
|
||||||
if (rc != ERROR_SUCCESS)
|
|
||||||
return NULL;
|
wchar_t keyName[256];
|
||||||
|
DWORD nameSize = sizeof(keyName) + 2;
|
||||||
wchar_t keyName[256];
|
|
||||||
DWORD nameSize = sizeof(keyName) + 2;
|
rc = RegEnumKeyEx(skey, index,
|
||||||
|
keyName, // UNICODE string
|
||||||
rc = RegEnumKeyEx(skey, index,
|
&nameSize,
|
||||||
keyName, // UNICODE string
|
NULL, NULL,
|
||||||
&nameSize,
|
NULL,
|
||||||
NULL, NULL,
|
NULL); // size in BYTE of data.
|
||||||
NULL,
|
|
||||||
NULL); // size in BYTE of data.
|
if (rc == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
if (rc == ERROR_SUCCESS)
|
result = env->NewString((jchar *)keyName, nameSize);
|
||||||
{
|
}
|
||||||
result = env->NewString((jchar *)keyName, nameSize);
|
|
||||||
}
|
RegCloseKey(skey);
|
||||||
|
|
||||||
RegCloseKey(skey);
|
env->ReleaseStringChars(subkey, csubkey);
|
||||||
|
|
||||||
env->ReleaseStringChars(subkey, csubkey);
|
return result;
|
||||||
|
}
|
||||||
return result;
|
|
||||||
}
|
extern "C"
|
||||||
|
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getLocalMachineKeyName(
|
||||||
extern "C"
|
JNIEnv * env, jobject obj, jstring subkey, jint index)
|
||||||
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getLocalMachineKeyName(
|
{
|
||||||
JNIEnv * env, jobject obj, jstring subkey, jint index)
|
return getKeyName(env, HKEY_LOCAL_MACHINE, subkey, index);
|
||||||
{
|
}
|
||||||
return getKeyName(env, HKEY_LOCAL_MACHINE, subkey, index);
|
|
||||||
}
|
extern "C"
|
||||||
|
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getCurrentUserKeyName(
|
||||||
extern "C"
|
JNIEnv * env, jobject obj, jstring subkey, jint index)
|
||||||
JNIEXPORT jstring JNICALL Java_org_eclipse_cdt_utils_WindowsRegistry_getCurrentUserKeyName(
|
{
|
||||||
JNIEnv * env, jobject obj, jstring subkey, jint index)
|
return getKeyName(env, HKEY_CURRENT_USER, subkey, index);
|
||||||
{
|
}
|
||||||
return getKeyName(env, HKEY_CURRENT_USER, subkey, index);
|
|
||||||
}
|
|
||||||
|
|
175
core/org.eclipse.cdt.core.win32/library/winreg/winreg.vcxproj
Normal file
175
core/org.eclipse.cdt.core.win32/library/winreg/winreg.vcxproj
Normal file
|
@ -0,0 +1,175 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{4CA57EA3-42F2-4CC1-8E95-5C707A8E7363}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>winreg</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>$(SolutionDir)..\..\org.eclipse.cdt.core.win32.x86\os\win32\x86\</OutDir>
|
||||||
|
<IntDir />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>$(SolutionDir)..\..\org.eclipse.cdt.core.win32.x86_64\os\win32\x86_64\</OutDir>
|
||||||
|
<IntDir />
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;WINREG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;WINREG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WINREG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Program Files\Java\jdk1.8.0_31\include;C:\Program Files\Java\jdk1.8.0_31\include\win32</AdditionalIncludeDirectories>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WINREG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<AdditionalIncludeDirectories>C:\Program Files\Java\jdk1.8.0_31\include;C:\Program Files\Java\jdk1.8.0_31\include\win32</AdditionalIncludeDirectories>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="stdafx.h" />
|
||||||
|
<ClInclude Include="targetver.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="dllmain.cpp">
|
||||||
|
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
||||||
|
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
||||||
|
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="stdafx.cpp">
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="winreg.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="stdafx.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="targetver.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="stdafx.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="winreg.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="dllmain.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
Loading…
Add table
Reference in a new issue