first commit

This commit is contained in:
2025-04-07 07:44:27 -07:00
commit d6cde0c05e
512 changed files with 142392 additions and 0 deletions

View File

@@ -0,0 +1,274 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace InpOut32.Net
{
public partial class CSharpExample : Form
{
[DllImport("inpout32.dll")]
private static extern UInt32 IsInpOutDriverOpen();
[DllImport("inpout32.dll")]
private static extern void Out32(short PortAddress, short Data);
[DllImport("inpout32.dll")]
private static extern char Inp32(short PortAddress);
[DllImport("inpout32.dll")]
private static extern void DlPortWritePortUshort(short PortAddress, ushort Data);
[DllImport("inpout32.dll")]
private static extern ushort DlPortReadPortUshort(short PortAddress);
[DllImport("inpout32.dll")]
private static extern void DlPortWritePortUlong(int PortAddress, uint Data);
[DllImport("inpout32.dll")]
private static extern uint DlPortReadPortUlong(int PortAddress);
[DllImport("inpoutx64.dll")]
private static extern bool GetPhysLong(ref int PortAddress, ref uint Data);
[DllImport("inpoutx64.dll")]
private static extern bool SetPhysLong(ref int PortAddress, ref uint Data);
[DllImport("inpoutx64.dll", EntryPoint="IsInpOutDriverOpen")]
private static extern UInt32 IsInpOutDriverOpen_x64();
[DllImport("inpoutx64.dll", EntryPoint = "Out32")]
private static extern void Out32_x64(short PortAddress, short Data);
[DllImport("inpoutx64.dll", EntryPoint = "Inp32")]
private static extern char Inp32_x64(short PortAddress);
[DllImport("inpoutx64.dll", EntryPoint = "DlPortWritePortUshort")]
private static extern void DlPortWritePortUshort_x64(short PortAddress, ushort Data);
[DllImport("inpoutx64.dll", EntryPoint = "DlPortReadPortUshort")]
private static extern ushort DlPortReadPortUshort_x64(short PortAddress);
[DllImport("inpoutx64.dll", EntryPoint = "DlPortWritePortUlong")]
private static extern void DlPortWritePortUlong_x64(int PortAddress, uint Data);
[DllImport("inpoutx64.dll", EntryPoint = "DlPortReadPortUlong")]
private static extern uint DlPortReadPortUlong_x64(int PortAddress);
[DllImport("inpoutx64.dll", EntryPoint = "GetPhysLong")]
private static extern bool GetPhysLong_x64(ref int PortAddress, ref uint Data);
[DllImport("inpoutx64.dll", EntryPoint = "SetPhysLong")]
private static extern bool SetPhysLong_x64(ref int PortAddress, ref uint Data);
bool m_bX64 = false;
public CSharpExample()
{
InitializeComponent();
try
{
uint nResult = 0;
try
{
nResult = IsInpOutDriverOpen();
}
catch (BadImageFormatException)
{
nResult = IsInpOutDriverOpen_x64();
if (nResult != 0)
m_bX64 = true;
}
if (nResult == 0)
{
lblMessage.Text = "Unable to open InpOut32 driver";
button1.Enabled = false;
button2.Enabled = false;
button3.Enabled = false;
button4.Enabled = false;
button5.Enabled = false;
button6.Enabled = false;
button7.Enabled = false;
}
}
catch (DllNotFoundException ex)
{
System.Diagnostics.Debug.WriteLine(ex.ToString());
lblMessage.Text = "Unable to find InpOut32.dll";
button1.Enabled = false;
button2.Enabled = false;
button3.Enabled = false;
button4.Enabled = false;
button5.Enabled = false;
button6.Enabled = false;
button7.Enabled = false;
}
}
private void button1_Click(object sender, EventArgs e)
{
try
{
short iPort = Convert.ToInt16(textBox1.Text);
char c;
if (m_bX64)
c = Inp32_x64(iPort);
else
c = Inp32(iPort);
textBox2.Text = Convert.ToInt32(c).ToString();
}
catch (Exception ex)
{
MessageBox.Show("An error occured:\n" + ex.Message);
}
}
private void button2_Click(object sender, EventArgs e)
{
try
{
short iPort = Convert.ToInt16(textBox1.Text);
short iData = Convert.ToInt16(textBox2.Text);
textBox2.Text = "";
if (m_bX64)
Out32_x64(iPort, iData);
else
Out32(iPort, iData);
}
catch (Exception ex)
{
MessageBox.Show("An error occured:\n" + ex.Message);
}
}
private void button3_Click(object sender, EventArgs e)
{
try
{
short iPort = Convert.ToInt16(textBox1.Text);
ushort s;
if (m_bX64)
s = DlPortReadPortUshort_x64(iPort);
else
s = DlPortReadPortUshort(iPort);
textBox2.Text = Convert.ToUInt16(s).ToString();
}
catch (Exception ex)
{
MessageBox.Show("An error occured:\n" + ex.Message);
}
}
private void button4_Click(object sender, EventArgs e)
{
try
{
int nPort = Convert.ToInt32(textBox1.Text);
uint l;
if (m_bX64)
l = DlPortReadPortUlong_x64(nPort);
else
l = DlPortReadPortUlong(nPort);
textBox2.Text = l.ToString();
}
catch (Exception ex)
{
MessageBox.Show("An error occured:\n" + ex.Message);
}
}
private void button5_Click(object sender, EventArgs e)
{
try
{
short sPort = Convert.ToInt16(textBox1.Text);
ushort iData = Convert.ToUInt16(textBox2.Text);
textBox2.Text = "";
if (m_bX64)
DlPortWritePortUshort_x64(sPort, iData);
else
DlPortWritePortUshort(sPort, iData);
}
catch (Exception ex)
{
MessageBox.Show("An error occured:\n" + ex.Message);
}
}
private void button6_Click(object sender, EventArgs e)
{
try
{
int nPort = Convert.ToInt32(textBox1.Text);
uint nData = Convert.ToUInt32(textBox2.Text);
textBox2.Text = "";
if (m_bX64)
DlPortWritePortUlong_x64(nPort, nData);
else
DlPortWritePortUlong(nPort, nData);
}
catch (Exception ex)
{
MessageBox.Show("An error occured:\n" + ex.Message);
}
}
private void Beep(uint freq)
{
if (m_bX64)
{
Out32_x64(0x43, 0xB6);
Out32_x64(0x42, (byte)(freq & 0xFF));
Out32_x64(0x42, (byte)(freq >> 9));
System.Threading.Thread.Sleep(10);
Out32_x64(0x61, (byte)(Convert.ToByte(Inp32_x64(0x61)) | 0x03));
}
else
{
Out32(0x43, 0xB6);
Out32(0x42, (byte)(freq & 0xFF));
Out32(0x42, (byte)(freq >> 9));
System.Threading.Thread.Sleep(10);
Out32(0x61, (byte)(Convert.ToByte(Inp32(0x61)) | 0x03));
}
}
private void StopBeep()
{
if (m_bX64)
Out32_x64(0x61, (byte)(Convert.ToByte(Inp32_x64(0x61)) & 0xFC));
else
Out32(0x61, (byte)(Convert.ToByte(Inp32(0x61)) & 0xFC));
}
private void CSharpExample_Load(object sender, EventArgs e)
{
button7_Click(this, null);
}
private void ThreadBeeper()
{
for (uint i = 440000; i < 500000; i += 1000)
{
uint freq = 1193180000 / i; // 440Hz
Beep(freq);
}
StopBeep();
}
private void button7_Click(object sender, EventArgs e)
{
System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(ThreadBeeper));
t.Start();
}
}
}

View File

@@ -0,0 +1,35 @@
// InstallDriver.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "InstallDriver.h"
#include "..\inpout32.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// The one and only application object
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
int nRetCode = 0;
BOOL bResult = IsInpOutDriverOpen();
if (IsXP64Bit())
{
if (bResult)
MessageBox(NULL, _T("Successfully installed and opened\n64bit InpOut driver InpOutx64.sys."), _T("InpOut Installation"), 0);
else
MessageBox(NULL, _T("Unable to install or open the\n64bit InpOut driver InpOutx64.sys.\n\nPlease try running as Administrator"), _T("InpOut Installation"), 0);
}
else
{
if (bResult)
MessageBox(NULL, _T("Successfully installed and opened\n32bit InpOut driver InpOut32.sys."), _T("InpOut Installation"), 0);
else
MessageBox(NULL, _T("Unable to install or open the\n32bit InpOut driver InpOut32.sys.\n\nPlease try running as Administrator"), _T("InpOut Installation"), 0);
}
return nRetCode;
}

View File

@@ -0,0 +1,3 @@
#pragma once
#include "resource.h"

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@@ -0,0 +1,113 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.K.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,0,0
PRODUCTVERSION 1,4,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904b0"
BEGIN
VALUE "CompanyName", "Highresolution Enterprises"
VALUE "FileDescription", "InstallDriver Windows Vista/7 support application"
VALUE "FileVersion", "1, 4, 0, 0"
VALUE "InternalName", "InstallDriver"
VALUE "LegalCopyright", "Copyright (C) 2007-2011 Highresolution Enterprises"
VALUE "OriginalFilename", "InstallDriver.exe"
VALUE "ProductName", "InstallDriver Application"
VALUE "ProductVersion", "1, 4, 0, 0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809, 1200
END
END
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
IDS_APP_TITLE "InstallDriver"
END
#endif // English (U.K.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,254 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="InstallDriver"
ProjectGUID="{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}"
RootNamespace="InstallDriver"
SccProjectName="SAK"
SccAuxPath="SAK"
SccLocalPath="SAK"
SccProvider="SAK"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="0"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="inpout32.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="$(OutDir)"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="InstallDriver.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
UseOfMFC="0"
UseOfATL="0"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
RuntimeLibrary="0"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="inpout32.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="$(OutDir)"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="InstallDriver.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\InstallDriver.cpp"
>
</File>
<File
RelativePath=".\stdafx.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\InstallDriver.h"
>
</File>
<File
RelativePath=".\Resource.h"
>
</File>
<File
RelativePath=".\stdafx.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath=".\InstallDriver.manifest"
>
</File>
<File
RelativePath=".\InstallDriver.rc"
>
</File>
</Filter>
<File
RelativePath=".\ReadMe.txt"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,46 @@
========================================================================
CONSOLE APPLICATION : InstallDriver Project Overview
========================================================================
AppWizard has created this InstallDriver application for you.
This file contains a summary of what you will find in each of the files that
make up your InstallDriver application.
InstallDriver.vcproj
This is the main project file for VC++ projects generated using an Application Wizard.
It contains information about the version of Visual C++ that generated the file, and
information about the platforms, configurations, and project features selected with the
Application Wizard.
InstallDriver.cpp
This is the main application source file.
/////////////////////////////////////////////////////////////////////////////
AppWizard has created the following resources:
InstallDriver.rc
This is a listing of all of the Microsoft Windows resources that the
program uses. It includes the icons, bitmaps, and cursors that are stored
in the RES subdirectory. This file can be directly edited in Microsoft
Visual C++.
Resource.h
This is the standard header file, which defines new resource IDs.
Microsoft Visual C++ reads and updates this file.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named InstallDriver.pch and a precompiled types file named StdAfx.obj.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" comments to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,17 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by InstallDriver.rc
//
#define IDR_MANIFEST 1
#define IDS_APP_TITLE 103
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -0,0 +1,8 @@
// stdafx.cpp : source file that includes just the standard includes
// InstallDriver.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file

View File

@@ -0,0 +1,27 @@
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows XP or later.
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
#endif
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
// C RunTime Header Files
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>

View File

@@ -0,0 +1,24 @@
InpOut32Drv Driver Interface DLL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modified for x64 compatibility and built by Phillip Gibbons (Phil@highrez.co.uk).
See http://www.highrez.co.uk/Downloads/InpOut32 or the Highrez Forums (http://forums.highrez.co.uk) for information.
Many thanks to Red Fox UK for supporting the community and providing Driver signatures allowing Vista/7 x64 compatibility.
Based on the original written by Logix4U (www.logix4u.net).
Notes:
The InpOut32 device driver supports writing to "old fashioned" hardware port addresses.
It does NOT support USB devices such as USB Parallel ports or even PCI parallel ports (as I am lead to believe).
The device driver is installed at runtime. To do this however needs administrator privileges.
On Vista & later, using UAC, you can run the InstallDriver.exe in the \Win32 folder to install the driver
appropriate for your OS. Doing so will request elevation and ask for your permission (or for the administrator
password). Once the driver is installed for the first time, it can then be used by any user *without*
administrator privileges

View File

@@ -0,0 +1,8 @@
// stdafx.cpp : source file that includes just the standard includes
// inpout32drv.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file

View File

@@ -0,0 +1,39 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__7ACF5BF3_42A3_43EB_9034_6218487B5231__INCLUDED_)
#define AFX_STDAFX_H__7ACF5BF3_42A3_43EB_9034_6218487B5231__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef WINVER
#define WINVER 0x0400
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
#ifndef _WIN32_WINDOWS
#define _WIN32_WINDOWS 0x0410
#endif
#ifndef _WIN32_IE
#define _WIN32_IE 0x0600
#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
// TODO: reference additional headers your program requires here
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__7ACF5BF3_42A3_43EB_9034_6218487B5231__INCLUDED_)

View File

@@ -0,0 +1,29 @@
#define IOCTL_READ_PORT_UCHAR -1673519100 //CTL_CODE(40000, 0x801, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_WRITE_PORT_UCHAR -1673519096 //CTL_CODE(40000, 0x802, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_READ_PORT_USHORT -1673519092 //CTL_CODE(40000, 0x803, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_WRITE_PORT_USHORT -1673519088 //CTL_CODE(40000, 0x804, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_READ_PORT_ULONG -1673519084 //CTL_CODE(40000, 0x805, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_WRITE_PORT_ULONG -1673519080 //CTL_CODE(40000, 0x806, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_WINIO_MAPPHYSTOLIN -1673519076
#define IOCTL_WINIO_UNMAPPHYSADDR -1673519072
BOOL _stdcall IsXP64Bit();
int SystemVersion();
BOOL DisableWOW64(PVOID* oldValue);
BOOL RevertWOW64(PVOID* oldValue);
#pragma pack(push)
#pragma pack(1)
struct tagPhys32Struct
{
HANDLE PhysicalMemoryHandle;
SIZE_T dwPhysMemSizeInBytes;
PVOID pvPhysAddress;
PVOID pvPhysMemLin;
};
extern struct tagPhys32Struct Phys32Struct;
#pragma pack(pop)

View File

@@ -0,0 +1,32 @@
#pragma once
//Functions exported from DLL.
//For easy inclusion is user projects.
//Original InpOut32 function support
void _stdcall Out32(short PortAddress, short data);
short _stdcall Inp32(short PortAddress);
//My extra functions for making life easy
BOOL _stdcall IsInpOutDriverOpen(); //Returns TRUE if the InpOut driver was opened successfully
BOOL _stdcall IsXP64Bit(); //Returns TRUE if the OS is 64bit (x64) Windows.
//DLLPortIO function support
UCHAR _stdcall DlPortReadPortUchar (USHORT port);
void _stdcall DlPortWritePortUchar(USHORT port, UCHAR Value);
USHORT _stdcall DlPortReadPortUshort (USHORT port);
void _stdcall DlPortWritePortUshort(USHORT port, USHORT Value);
ULONG _stdcall DlPortReadPortUlong(ULONG port);
void _stdcall DlPortWritePortUlong(ULONG port, ULONG Value);
//WinIO function support (Untested and probably does NOT work - esp. on x64!)
PBYTE _stdcall MapPhysToLin(PBYTE pbPhysAddr, DWORD dwPhysSize, HANDLE *pPhysicalMemoryHandle);
BOOL _stdcall UnmapPhysicalMemory(HANDLE PhysicalMemoryHandle, PBYTE pbLinAddr);
BOOL _stdcall GetPhysLong(PBYTE pbPhysAddr, PDWORD pdwPhysVal);
BOOL _stdcall SetPhysLong(PBYTE pbPhysAddr, DWORD dwPhysVal);

Binary file not shown.

View File

@@ -0,0 +1,691 @@
/***********************************************************************\
* *
* InpOut32drv.cpp *
* *
* The entry point for the InpOut DLL *
* Provides the 32 and 64bit implementation of InpOut32 DLL to install *
* and call the appropriate driver and write directly to hardware ports. *
* *
* Written by Phillip Gibbons (Highrez.co.uk) *
* Based on orriginal, written by Logix4U (www.logix4u.net) *
* *
\***********************************************************************/
#include "stdafx.h"
#include <conio.h>
#include <stdlib.h>
#include <stdio.h>
#include "hwinterfacedrv.h"
#include "resource.h"
int inst32();
int inst64();
int start(LPCTSTR pszDriver);
//First, lets set the DRIVERNAME depending on our configuraiton.
#define DRIVERNAMEx64 _T("inpoutx64\0")
#define DRIVERNAMEi386 _T("inpout32\0")
char str[10];
int vv;
HANDLE hdriver=NULL;
TCHAR path[MAX_PATH];
HINSTANCE hmodule;
SECURITY_ATTRIBUTES sa;
int sysver;
int Opendriver(BOOL bX64);
void Closedriver(void);
BOOL APIENTRY DllMain( HINSTANCE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
hmodule = hModule;
BOOL bx64 = IsXP64Bit();
switch(ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
{
sysver = SystemVersion();
if(sysver==2)
{
Opendriver(bx64);
}
}
break;
case DLL_PROCESS_DETACH:
{
if(sysver==2)
{
Closedriver();
}
}
break;
}
return TRUE;
}
/***********************************************************************/
void Closedriver(void)
{
if (hdriver)
{
OutputDebugString(_T("Closing InpOut driver...\n"));
CloseHandle(hdriver);
hdriver=NULL;
}
}
void _stdcall Out32(short PortAddress, short data)
{
{
switch(sysver)
{
case 1:
#ifdef _M_IX86
_outp( PortAddress,data); //Will ONLY compile on i386 architecture
#endif
break;
case 2:
unsigned int error;
DWORD BytesReturned;
BYTE Buffer[3]={NULL};
unsigned short* pBuffer;
pBuffer = (unsigned short *)&Buffer[0];
*pBuffer = LOWORD(PortAddress);
Buffer[2] = LOBYTE(data);
error = DeviceIoControl(hdriver,
IOCTL_WRITE_PORT_UCHAR,
&Buffer,
3,
NULL,
0,
&BytesReturned,
NULL);
break;
}
}
}
/*********************************************************************/
short _stdcall Inp32(short PortAddress)
{
{
BYTE retval(0);
switch(sysver)
{
case 1:
#ifdef _M_IX86
retval = _inp(PortAddress);
#endif
return retval;
break;
case 2:
unsigned int error;
DWORD BytesReturned;
unsigned char Buffer[3]={NULL};
unsigned short * pBuffer;
pBuffer = (unsigned short *)&Buffer;
*pBuffer = LOWORD(PortAddress);
Buffer[2] = 0;
error = DeviceIoControl(hdriver,
IOCTL_READ_PORT_UCHAR,
&Buffer,
2,
&Buffer,
1,
&BytesReturned,
NULL);
if (error==0)
{
DWORD dwError = GetLastError();
TCHAR tszError[255];
_stprintf_s(tszError, 255, _T("Error %d\n"), dwError);
OutputDebugString(tszError);
}
//Do this to ensure only the first byte is returned, we dont really want to return a short as were only reading a byte.
//but we also dont want to change the InpOut interface!
UCHAR ucRes = (UCHAR)Buffer[0];
return ucRes;
break;
}
}
return 0;
}
/*********************************************************************/
int Opendriver(BOOL bX64)
{
OutputDebugString(_T("Attempting to open InpOut driver...\n"));
TCHAR szFileName[MAX_PATH] = {NULL};
_stprintf_s(szFileName, MAX_PATH, _T("\\\\.\\%s"), bX64 ? DRIVERNAMEx64 : DRIVERNAMEi386);
hdriver = CreateFile(szFileName,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
if(hdriver == INVALID_HANDLE_VALUE)
{
if(start(bX64 ? DRIVERNAMEx64 : DRIVERNAMEi386))
{
if (bX64)
inst64(); //Install the x64 driver
else
inst32(); //Install the i386 driver
int nResult = start(bX64 ? DRIVERNAMEx64 : DRIVERNAMEi386);
if (nResult == ERROR_SUCCESS)
{
hdriver = CreateFile(szFileName,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
if(hdriver != INVALID_HANDLE_VALUE)
{
OutputDebugString(_T("Successfully opened "));
OutputDebugString(bX64 ? DRIVERNAMEx64 : DRIVERNAMEi386);
OutputDebugString(_T(" driver\n"));
return 0;
}
}
else
{
TCHAR szMsg[MAX_PATH] = {NULL};
_stprintf_s(szMsg, MAX_PATH, _T("Unable to open %s driver. Error code %d.\n"), bX64 ? DRIVERNAMEx64 : DRIVERNAMEi386, nResult);
OutputDebugString(szMsg);
//RemoveDriver();
}
}
return 1;
}
OutputDebugString(_T("Successfully opened "));
OutputDebugString(bX64 ? DRIVERNAMEx64 : DRIVERNAMEi386);
OutputDebugString(_T(" driver\n"));
return 0;
}
/***********************************************************************/
int inst32()
{
TCHAR szDriverSys[MAX_PATH];
_tcscpy_s(szDriverSys, MAX_PATH, DRIVERNAMEi386);
_tcscat_s(szDriverSys, MAX_PATH, _T(".sys\0"));
SC_HANDLE Mgr;
SC_HANDLE Ser;
GetSystemDirectory(path, MAX_PATH);
HRSRC hResource = FindResource(hmodule, MAKEINTRESOURCE(IDR_INPOUT32), _T("bin"));
if(hResource)
{
HGLOBAL binGlob = LoadResource(hmodule, hResource);
if(binGlob)
{
void *binData = LockResource(binGlob);
if(binData)
{
HANDLE file;
_tcscat_s(path, sizeof(path), _T("\\Drivers\\"));
_tcscat_s(path, sizeof(path), szDriverSys);
file = CreateFile(path,
GENERIC_WRITE,
0,
NULL,
CREATE_ALWAYS,
0,
NULL);
if (file && file != INVALID_HANDLE_VALUE)
{
DWORD size, written;
size = SizeofResource(hmodule, hResource);
WriteFile(file, binData, size, &written, NULL);
CloseHandle(file);
}
else
{
//Error
}
}
}
}
Mgr = OpenSCManager (NULL, NULL,SC_MANAGER_ALL_ACCESS);
if (Mgr == NULL)
{ //No permission to create service
if (GetLastError() == ERROR_ACCESS_DENIED)
{
return 5; // error access denied
}
}
else
{
TCHAR szFullPath[MAX_PATH] = _T("System32\\Drivers\\\0");
_tcscat_s(szFullPath, MAX_PATH, szDriverSys);
Ser = CreateService (Mgr,
DRIVERNAMEi386,
DRIVERNAMEi386,
SERVICE_ALL_ACCESS,
SERVICE_KERNEL_DRIVER,
SERVICE_AUTO_START,
SERVICE_ERROR_NORMAL,
szFullPath,
NULL,
NULL,
NULL,
NULL,
NULL
);
}
CloseServiceHandle(Ser);
CloseServiceHandle(Mgr);
return 0;
}
int inst64()
{
TCHAR szDriverSys[MAX_PATH];
_tcscpy_s(szDriverSys, MAX_PATH, DRIVERNAMEx64);
_tcscat_s(szDriverSys, MAX_PATH, _T(".sys\0"));
SC_HANDLE Mgr;
SC_HANDLE Ser;
GetSystemDirectory(path, MAX_PATH);
HRSRC hResource = FindResource(hmodule, MAKEINTRESOURCE(IDR_INPOUTX64), _T("bin"));
if(hResource)
{
HGLOBAL binGlob = LoadResource(hmodule, hResource);
if(binGlob)
{
void *binData = LockResource(binGlob);
if(binData)
{
HANDLE file;
_tcscat_s(path, sizeof(path), _T("\\Drivers\\"));
_tcscat_s(path, sizeof(path), szDriverSys);
PVOID OldValue;
DisableWOW64(&OldValue);
file = CreateFile(path,
GENERIC_WRITE,
0,
NULL,
CREATE_ALWAYS,
0,
NULL);
if(file && file != INVALID_HANDLE_VALUE)
{
DWORD size, written;
size = SizeofResource(hmodule, hResource);
WriteFile(file, binData, size, &written, NULL);
CloseHandle(file);
}
else
{
//error
}
RevertWOW64(&OldValue);
}
}
}
Mgr = OpenSCManager (NULL, NULL,SC_MANAGER_ALL_ACCESS);
if (Mgr == NULL)
{ //No permission to create service
if (GetLastError() == ERROR_ACCESS_DENIED)
{
return 5; // error access denied
}
}
else
{
TCHAR szFullPath[MAX_PATH] = _T("System32\\Drivers\\\0");
_tcscat_s(szFullPath, MAX_PATH, szDriverSys);
Ser = CreateService (Mgr,
DRIVERNAMEx64,
DRIVERNAMEx64,
SERVICE_ALL_ACCESS,
SERVICE_KERNEL_DRIVER,
SERVICE_AUTO_START,
SERVICE_ERROR_NORMAL,
szFullPath,
NULL,
NULL,
NULL,
NULL,
NULL
);
}
CloseServiceHandle(Ser);
CloseServiceHandle(Mgr);
return 0;
}
/**************************************************************************/
int start(LPCTSTR pszDriver)
{
SC_HANDLE Mgr;
SC_HANDLE Ser;
Mgr = OpenSCManager (NULL, NULL,SC_MANAGER_ALL_ACCESS);
if (Mgr == NULL)
{ //No permission to create service
if (GetLastError() == ERROR_ACCESS_DENIED)
{
Mgr = OpenSCManager (NULL, NULL, GENERIC_READ);
Ser = OpenService(Mgr, pszDriver, GENERIC_EXECUTE);
if (Ser)
{ // we have permission to start the service
if(!StartService(Ser,0,NULL))
{
CloseServiceHandle (Ser);
return 4; // we could open the service but unable to start
}
}
}
}
else
{// Successfuly opened Service Manager with full access
Ser = OpenService(Mgr, pszDriver, SERVICE_ALL_ACCESS);
if (Ser)
{
if(!StartService(Ser,0,NULL))
{
CloseServiceHandle (Ser);
return 3; // opened the Service handle with full access permission, but unable to start
}
else
{
CloseServiceHandle (Ser);
return 0;
}
}
}
return 1;
}
BOOL _stdcall IsInpOutDriverOpen()
{
sysver = SystemVersion();
if (sysver==2)
{
if (hdriver!=INVALID_HANDLE_VALUE && hdriver != NULL)
return TRUE;
}
else if (sysver==1)
{
return TRUE;
}
return FALSE;
}
UCHAR _stdcall DlPortReadPortUchar (USHORT port)
{
UCHAR retval(0);
switch(sysver)
{
case 1:
#ifdef _M_IX86
retval = _inp((USHORT)port);
#endif
return retval;
break;
case 2:
unsigned int error;
DWORD BytesReturned;
BYTE Buffer[3]={NULL};
unsigned short * pBuffer;
pBuffer = (unsigned short *)&Buffer;
*pBuffer = port;
Buffer[2] = 0;
error = DeviceIoControl(hdriver,
IOCTL_READ_PORT_UCHAR,
&Buffer,
sizeof(Buffer),
&Buffer,
sizeof(Buffer),
&BytesReturned,
NULL);
return((UCHAR)Buffer[0]);
break;
}
return 0;
}
void _stdcall DlPortWritePortUchar (USHORT port, UCHAR Value)
{
switch(sysver)
{
case 1:
#ifdef _M_IX86
_outp((UINT)port,Value); //Will ONLY compile on i386 architecture
#endif
break;
case 2:
unsigned int error;
DWORD BytesReturned;
BYTE Buffer[3]={NULL};
unsigned short * pBuffer;
pBuffer = (unsigned short *)&Buffer[0];
*pBuffer = port;
Buffer[2] = Value;
error = DeviceIoControl(hdriver,
IOCTL_WRITE_PORT_UCHAR,
&Buffer,
sizeof(Buffer),
NULL,
0,
&BytesReturned,
NULL);
break;
}
}
USHORT _stdcall DlPortReadPortUshort (USHORT port)
{
if (sysver!=2)
return 0;
ULONG retval(0);
unsigned int error;
DWORD BytesReturned;
unsigned short sPort=port;
error = DeviceIoControl(hdriver,
IOCTL_READ_PORT_USHORT,
&sPort,
sizeof(unsigned short),
&sPort,
sizeof(unsigned short),
&BytesReturned,
NULL);
return(sPort);
}
void _stdcall DlPortWritePortUshort (USHORT port, USHORT Value)
{
if (sysver!=2)
return;
unsigned int error;
DWORD BytesReturned;
BYTE Buffer[5]={NULL};
unsigned short * pBuffer;
pBuffer = (unsigned short *)&Buffer[0];
*pBuffer = LOWORD(port);
*(pBuffer+1) = Value;
error = DeviceIoControl(hdriver,
IOCTL_WRITE_PORT_USHORT,
&Buffer,
sizeof(Buffer),
NULL,
0,
&BytesReturned,
NULL);
}
ULONG _stdcall DlPortReadPortUlong(ULONG port)
{
if (sysver!=2)
return 0;
ULONG retval(0);
unsigned int error;
DWORD BytesReturned;
unsigned long lPort=port;
PULONG ulBuffer;
ulBuffer = (PULONG)&lPort;
ULONG test = ulBuffer[0];
error = DeviceIoControl(hdriver,
IOCTL_READ_PORT_ULONG,
&lPort,
sizeof(unsigned long),
&lPort,
sizeof(unsigned long),
&BytesReturned,
NULL);
return(lPort);
}
void _stdcall DlPortWritePortUlong (ULONG port, ULONG Value)
{
if (sysver!=2)
return;
unsigned int error;
DWORD BytesReturned;
BYTE Buffer[8] = {NULL};
unsigned long* pBuffer;
pBuffer = (unsigned long*)&Buffer[0];
*pBuffer = port;
*(pBuffer+1) = Value;
error = DeviceIoControl(hdriver,
IOCTL_WRITE_PORT_ULONG,
&Buffer,
sizeof(Buffer),
NULL,
0,
&BytesReturned,
NULL);
}
// Support functions for WinIO
PBYTE _stdcall MapPhysToLin(PBYTE pbPhysAddr, DWORD dwPhysSize, HANDLE *pPhysicalMemoryHandle)
{
PBYTE pbLinAddr;
tagPhys32Struct Phys32Struct;
DWORD dwBytesReturned;
if (sysver!=2)
return false;
Phys32Struct.dwPhysMemSizeInBytes = dwPhysSize;
Phys32Struct.pvPhysAddress = pbPhysAddr;
if (!DeviceIoControl(hdriver, IOCTL_WINIO_MAPPHYSTOLIN, &Phys32Struct,
sizeof(tagPhys32Struct), &Phys32Struct, sizeof(tagPhys32Struct),
&dwBytesReturned, NULL))
return NULL;
else
{
#ifdef _M_X64
pbLinAddr = (PBYTE)((LONGLONG)Phys32Struct.pvPhysMemLin + (LONGLONG)pbPhysAddr - (LONGLONG)Phys32Struct.pvPhysAddress);
#else
pbLinAddr = (PBYTE)((DWORD)Phys32Struct.pvPhysMemLin + (DWORD)pbPhysAddr - (DWORD)Phys32Struct.pvPhysAddress);
#endif
*pPhysicalMemoryHandle = Phys32Struct.PhysicalMemoryHandle;
}
return pbLinAddr;
}
BOOL _stdcall UnmapPhysicalMemory(HANDLE PhysicalMemoryHandle, PBYTE pbLinAddr)
{
tagPhys32Struct Phys32Struct;
DWORD dwBytesReturned;
if (sysver!=2)
return false;
Phys32Struct.PhysicalMemoryHandle = PhysicalMemoryHandle;
Phys32Struct.pvPhysMemLin = pbLinAddr;
if (!DeviceIoControl(hdriver, IOCTL_WINIO_UNMAPPHYSADDR, &Phys32Struct,
sizeof(tagPhys32Struct), NULL, 0, &dwBytesReturned, NULL))
return false;
return true;
}
BOOL _stdcall GetPhysLong(PBYTE pbPhysAddr, PDWORD pdwPhysVal)
{
PDWORD pdwLinAddr;
HANDLE PhysicalMemoryHandle;
if (sysver!=2)
return false;
pdwLinAddr = (PDWORD)MapPhysToLin(pbPhysAddr, 4, &PhysicalMemoryHandle);
if (pdwLinAddr == NULL)
return false;
*pdwPhysVal = *pdwLinAddr;
UnmapPhysicalMemory(PhysicalMemoryHandle, (PBYTE)pdwLinAddr);
return true;
}
BOOL _stdcall SetPhysLong(PBYTE pbPhysAddr, DWORD dwPhysVal)
{
PDWORD pdwLinAddr;
HANDLE PhysicalMemoryHandle;
if (sysver!=2)
return false;
pdwLinAddr = (PDWORD)MapPhysToLin(pbPhysAddr, 4, &PhysicalMemoryHandle);
if (pdwLinAddr == NULL)
return false;
*pdwLinAddr = dwPhysVal;
UnmapPhysicalMemory(PhysicalMemoryHandle, (PBYTE)pdwLinAddr);
return true;
}

View File

@@ -0,0 +1,18 @@
EXPORTS
Inp32 @1
Out32 @2
IsInpOutDriverOpen @3
DlPortReadPortUchar @4
DlPortWritePortUchar @5
DlPortReadPortUshort @6
DlPortWritePortUshort @7
DlPortReadPortUlong @8
DlPortWritePortUlong @9
IsXP64Bit @10
MapPhysToLin @11
UnmapPhysicalMemory @12
GetPhysLong @13
SetPhysLong @14

View File

@@ -0,0 +1,125 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,5,0,0
PRODUCTVERSION 1,5,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x21L
#else
FILEFLAGS 0x20L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080004b0"
BEGIN
VALUE "Comments", "Includes signed x64 drivers for Vista compatibility."
VALUE "CompanyName", "Highresolution Enterprises"
VALUE "FileDescription", "inpout32/64"
VALUE "FileVersion", "1, 5, 0, 0"
VALUE "InternalName", "inpout32"
VALUE "LegalCopyright", "Freeware"
VALUE "LegalTrademarks", "Copyright © 2008-2011 Highresolution Enterprises. Portions Copyright Logix4U"
VALUE "OriginalFilename", "inpout32.dll"
VALUE "ProductName", "inpout32"
VALUE "ProductVersion", "1, 5, 0, 0"
VALUE "SpecialBuild", "x64 Compatible build\r\nIncludes basic DLPortIO Compatibility\r\nIncludes signed drivers (Thanks to Red Fox UK) for Vista x64 compatiblity.\r\n"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x800, 1200
END
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Neutral (Sys. Default) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUSD)
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_SYS_DEFAULT
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// BIN
//
IDR_INPOUT32 BIN "inpout32.sys"
IDR_INPOUTX64 BIN "inpoutx64.sys"
#endif // Neutral (Sys. Default) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,100 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inpout32drv", "inpout32drv.vcproj", "{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InstallDriver", "InstallDriver\InstallDriver.vcproj", "{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}"
ProjectSection(ProjectDependencies) = postProject
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3} = {18AEFF0B-D208-45B0-88E1-7057B9BA78F3}
EndProjectSection
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "InpOut32.VB.Net", "InpOut32.Net\InpOut32.VB.Net\InpOut32.VB.Net.vbproj", "{F90F25E7-E912-4948-B9CE-168FFA3014C8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InpOut32.CSharp.Net", "InpOut32.Net\InpOut32.CSharp.Net\InpOut32.CSharp.Net.csproj", "{784B3C36-7CAD-4B06-82A5-E60D17193F27}"
EndProject
Global
GlobalSection(SourceCodeControl) = preSolution
SccNumberOfProjects = 5
SccLocalPath0 = .
SccProjectUniqueName1 = inpout32drv.vcproj
SccLocalPath1 = .
SccProjectUniqueName2 = InstallDriver\\InstallDriver.vcproj
SccLocalPath2 = .
SccProjectFilePathRelativizedFromConnection2 = InstallDriver\\
SccProjectUniqueName3 = InpOut32.Net\\InpOut32.VB.Net\\InpOut32.VB.Net.vbproj
SccLocalPath3 = .
SccProjectFilePathRelativizedFromConnection3 = InpOut32.Net\\InpOut32.VB.Net\\
SccProjectUniqueName4 = InpOut32.Net\\InpOut32.CSharp.Net\\InpOut32.CSharp.Net.csproj
SccProjectName4 = \u0022$/inpout32drv.root/inpout32drv/InpOut32.Net/InpOut32.CSharp.Net\u0022,\u0020DHHAAAAA
SccLocalPath4 = InpOut32.Net\\InpOut32.CSharp.Net
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Debug|Any CPU.ActiveCfg = Debug|x64
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Debug|Mixed Platforms.Build.0 = Debug|x64
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Debug|Win32.ActiveCfg = Debug|Win32
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Debug|Win32.Build.0 = Debug|Win32
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Debug|x64.ActiveCfg = Debug|x64
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Debug|x64.Build.0 = Debug|x64
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Release|Any CPU.ActiveCfg = Release|x64
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Release|Mixed Platforms.ActiveCfg = Release|x64
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Release|Mixed Platforms.Build.0 = Release|x64
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Release|Win32.ActiveCfg = Release|Win32
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Release|Win32.Build.0 = Release|Win32
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Release|x64.ActiveCfg = Release|x64
{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}.Release|x64.Build.0 = Release|x64
{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}.Debug|Any CPU.ActiveCfg = Debug|Win32
{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}.Debug|Win32.ActiveCfg = Debug|Win32
{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}.Debug|Win32.Build.0 = Debug|Win32
{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}.Debug|x64.ActiveCfg = Debug|Win32
{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}.Release|Any CPU.ActiveCfg = Release|Win32
{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}.Release|Mixed Platforms.Build.0 = Release|Win32
{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}.Release|Win32.ActiveCfg = Release|Win32
{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}.Release|Win32.Build.0 = Release|Win32
{233B1347-4B15-42DC-AC23-C2FE2ABEAF54}.Release|x64.ActiveCfg = Release|Win32
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Debug|Win32.ActiveCfg = Debug|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Debug|Win32.Build.0 = Debug|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Debug|x64.ActiveCfg = Debug|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Debug|x64.Build.0 = Debug|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Release|Any CPU.Build.0 = Release|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Release|Win32.ActiveCfg = Release|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Release|Win32.Build.0 = Release|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Release|x64.ActiveCfg = Release|Any CPU
{F90F25E7-E912-4948-B9CE-168FFA3014C8}.Release|x64.Build.0 = Release|Any CPU
{784B3C36-7CAD-4B06-82A5-E60D17193F27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{784B3C36-7CAD-4B06-82A5-E60D17193F27}.Debug|Any CPU.Build.0 = Debug|Any CPU
{784B3C36-7CAD-4B06-82A5-E60D17193F27}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{784B3C36-7CAD-4B06-82A5-E60D17193F27}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{784B3C36-7CAD-4B06-82A5-E60D17193F27}.Debug|Win32.ActiveCfg = Debug|Any CPU
{784B3C36-7CAD-4B06-82A5-E60D17193F27}.Debug|x64.ActiveCfg = Debug|Any CPU
{784B3C36-7CAD-4B06-82A5-E60D17193F27}.Release|Any CPU.ActiveCfg = Release|Any CPU
{784B3C36-7CAD-4B06-82A5-E60D17193F27}.Release|Any CPU.Build.0 = Release|Any CPU
{784B3C36-7CAD-4B06-82A5-E60D17193F27}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{784B3C36-7CAD-4B06-82A5-E60D17193F27}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{784B3C36-7CAD-4B06-82A5-E60D17193F27}.Release|Win32.ActiveCfg = Release|Any CPU
{784B3C36-7CAD-4B06-82A5-E60D17193F27}.Release|x64.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,621 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="inpout32drv"
ProjectGUID="{18AEFF0B-D208-45B0-88E1-7057B9BA78F3}"
RootNamespace="inpout32drv"
SccProjectName="SAK"
SccAuxPath="SAK"
SccLocalPath="SAK"
SccProvider="SAK"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/inpout32drv.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;INPOUT32DRV_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile="$(IntDir)/inpout32.pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/inpout32.dll"
LinkIncremental="2"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\inpout32drv.def"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/inpout32.pdb"
ImportLibrary="$(OutDir)/inpout32.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Debug/inpout32drv.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Copy DLL to .NET Demo Project"
CommandLine="copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\InpOut32.Net\InpOut32.CSharp.Net\bin\$(ConfigurationName)\$(TargetFileName)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\InpOut32.Net\InpOut32.VB.Net\bin\$(ConfigurationName)\$(TargetFileName)&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="3"
TypeLibraryName=".\Debug/inpout32drv.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;INPOUT32DRV_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile="$(IntDir)/inpoutx64.pch"
AssemblerListingLocation="$(IntDir)/"
ObjectFile="$(IntDir)/"
ProgramDataBaseFileName="$(IntDir)/"
WarningLevel="3"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/inpoutx64.dll"
LinkIncremental="2"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\inpout32drv.def"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/inpoutx64.pdb"
ImportLibrary="$(OutDir)/inpoutx64.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Debug/inpout32drv.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Copy DLL to .NET Demo Project"
CommandLine="copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\InpOut32.Net\InpOut32.CSharp.Net\bin\$(ConfigurationName)\$(TargetFileName)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\InpOut32.Net\InpOut32.VB.Net\bin\$(ConfigurationName)\$(TargetFileName)&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/inpout32drv.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;INPOUT32DRV_EXPORTS"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile="$(IntDir)/inpout32.pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/inpout32.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\inpout32drv.def"
ProgramDatabaseFile="$(OutDir)/inpout32.pdb"
ImportLibrary="$(OutDir)/inpout32.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release/inpout32drv.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Copy DLL to .NET Demo Project"
CommandLine="copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\InpOut32.Net\InpOut32.CSharp.Net\bin\$(ConfigurationName)\$(TargetFileName)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\InpOut32.Net\InpOut32.VB.Net\bin\$(ConfigurationName)\$(TargetFileName)&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="3"
TypeLibraryName=".\Release/inpout32drv.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;INPOUT32DRV_EXPORTS"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile="$(IntDir)/inpoutx64.pch"
AssemblerListingLocation="$(IntDir)/"
ObjectFile="$(IntDir)/"
ProgramDataBaseFileName="$(IntDir)/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/inpoutx64.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\inpout32drv.def"
ProgramDatabaseFile="$(OutDir)/inpoutx64.pdb"
ImportLibrary="$(OutDir)/inpoutx64.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release/inpout32drv.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Copy DLL to .NET Demo Project"
CommandLine="copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\InpOut32.Net\InpOut32.CSharp.Net\bin\$(ConfigurationName)\$(TargetFileName)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\InpOut32.Net\InpOut32.VB.Net\bin\$(ConfigurationName)\$(TargetFileName)&quot;&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="inpout32drv.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="inpout32drv.def"
>
</File>
<File
RelativePath="inpout32drv.rc"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="osversion.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="StdAfx.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="hwinterfacedrv.h"
>
</File>
<File
RelativePath=".\inpout32.h"
>
</File>
<File
RelativePath=".\resource.h"
>
</File>
<File
RelativePath="StdAfx.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
</Filter>
<File
RelativePath=".\inpout32.sys"
>
</File>
<File
RelativePath=".\inpoutx64.sys"
>
</File>
<File
RelativePath="ReadMe.txt"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

Binary file not shown.

View File

@@ -0,0 +1,24 @@
Copyright (c) <2003-2015> Phil Gibbons <www.highrez.co.uk>
Portions Copyright (c) <2000> <logix4u.net>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,78 @@
#include "stdafx.h"
#include "hwinterfacedrv.h"
typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
typedef BOOL (WINAPI *LPFN_WOW64DISABLE) (PVOID*);
typedef BOOL (WINAPI *LPFN_WOW64REVERT) (PVOID);
LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle(_T("kernel32")),"IsWow64Process");
LPFN_WOW64DISABLE fnWow64Disable = (LPFN_WOW64DISABLE)GetProcAddress(GetModuleHandle(_T("kernel32")),"Wow64DisableWow64FsRedirection");
LPFN_WOW64REVERT fnWow64Revert = (LPFN_WOW64REVERT)GetProcAddress(GetModuleHandle(_T("kernel32")),"Wow64RevertWow64FsRedirection");
//Purpose: Return TRUE if we are running in WOW64 (i.e. a 32bit process on XP x64 edition)
BOOL _stdcall IsXP64Bit()
{
#ifdef _M_X64
return TRUE; //Urrr if its a x64 build of the DLL, we MUST be running on X64 nativly!
#endif
BOOL bIsWow64 = FALSE;
if (NULL != fnIsWow64Process)
{
if (!fnIsWow64Process(GetCurrentProcess(),&bIsWow64))
{
// handle error
}
}
return bIsWow64;
}
BOOL DisableWOW64(PVOID* oldValue)
{
#ifdef _M_X64
return TRUE; // If were 64b under x64, we dont wanna do anything!
#endif
return fnWow64Disable(oldValue);
}
BOOL RevertWOW64(PVOID* oldValue)
{
#ifdef _M_X64
return TRUE; // If were 64b under x64, we dont wanna do anything!
#endif
return fnWow64Revert (oldValue);
}
int SystemVersion()
{
OSVERSIONINFOEX osvi;
BOOL bOsVersionInfoEx;
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
if( !(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osvi)) )
{
osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
if (! GetVersionEx ( (OSVERSIONINFO *) &osvi) )
return 0;
}
switch (osvi.dwPlatformId)
{
case VER_PLATFORM_WIN32_NT:
return 2; //WINNT
break;
case VER_PLATFORM_WIN32_WINDOWS:
return 1; //WIN9X
break;
}
return 0;
}

View File

@@ -0,0 +1,18 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by inpout32drv.rc
//
#define IDR_BIN1 101
#define IDR_INPOUT32 101
#define IDR_INPOUTX64 104
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif