The latest Windows 10 and Windows 11 signed version (2.2.2.0) can be found at BrunnerInnovation/vJoy
For much more go to vJoy web site: http://vjoystick.sourceforge.net
To build the project:
-
Pull the project
-
Run batch file BuildAll.bat to get installer (in install/ directory)
-
Run batch file CreateSDK.bat to copy SDK files (in SDK/ directory)
Caution: You will need to install Visual Studio 2022 Community (Free) + WDK and MFC/ATL libraires with Spectre mitigation and InnoSetup 6.0. To build the entire project including the driver you need to install the SDK and puchase a license to sign drivers.
Justin's notes are now at the end of this document.
- Install VS2022 Community + Runtime/MFC/ATL Spectre mitigated librairies, all for v142.
- Install last WDK (10.0.22621.0) and last Windows 10 SDK (10.0.22621.0).
- Install Inno Setup 6.x.
- DigiCert utility is provided in the git tree for now, but you need a valid EV certificate. If you want to testsign the software, creates a WDKTestCertificate from VS2022 and register it in the certificate store (see chapter below)
- Open BuildAll.bat and make sure all paths are correct.
- Launch Developer Command Prompt for VS2022
- Run BuildAll.bat from command line. This will compile all software and build the installer.
- To build the SDK, run SDK\CreateSdk.bat from command line.
In case the installation failed, please post your problem in the forum. Attach two log files:
-
The log file for the Inno Setup wrapper is called Setup Log 2011-11-01 #xxx.txt and is located under %TEMP% folder. (xxx can be any number in the range 001-999).
-
The log file for the executable is called vJoyInstall.log and located in the vJoy folder (C:/Program Files/vJoy).
Shaul wrote very good guides about vJoy's internal, please see:
[http://vjoystick.sourceforge.net/site/index.php/dev216/system-architecture] https://web.archive.org/web/20190509030210/http://vjoystick.sourceforge.net/site/index.php/dev216/system-architecture
[http://vjoystick.sourceforge.net/site/index.php/dev216/internal-architecture] https://web.archive.org/web/20190509030210/http://vjoystick.sourceforge.net/site/index.php/dev216/internal-architecture
Shaul's notes here: [http://vjoystick.sourceforge.net/site/index.php/download-a-install/77-vjoy] https://web.archive.org/web/20180602003145/http://vjoystick.sourceforge.net/site/index.php/download-a-install/77-vjoy
This is an extract from the page :
- Enter
pnputil -e
in the command-line window.- Search for
Shaul
in the text you receive.If you don't find then vJoy is not installed
If you find entries of the following type:
Write down the names of the OEM files (e.g. oem86.inf) associated with vJoy.
Remove all OEM files associated with vJoy, one by one.
To remove an OEM file (e.g. oem86.inf) you need to enter
pnputil -f -d oemXX.inf
where XX stands for the appropriate number. (e.gpnputil -f -d oem86.inf
)
Since you need a EV certificate to build the public driver (which is expensive), there is still a solution for developping, debugging and testing.
You have to create a local test certificate from within Visual Studio in Driver Signing page, then select "Test Sign" as the signing mode instead of "Production Sign". If you don't have yet a test certificate, simply creates one from within Visual Studio dialog box. Once created, or if already created, use "select from store" to select the certificat and export it to a file (*.PFX recommended by Microsoft). Once you have build a full setup with the test-signed driver you can install it on a test computer with the test certificate.
To build the solution, the easiest solution is to run the provided batch file from either a cmd.exe prompt, or from within visual Studio, see:
The test computer must enable loading of test signed driver, see:
Basically, you have to remove UEFI secure boot from your Bios, then within Windows you must run cmd.exe with administrative provilieges and type:
C:\WINDOWS\system32> bcdedit.exe -set TESTSIGNING ON
Then reboot your computer. You shoud see a watermark in the bottom right corner telling you that the system is in test mode. Worth noting that doing that this is only for testing and not for permanent use.
Install the test certificate in the trusted root store, see:
https://www.tbs-certificates.co.uk/FAQ/en/174.html
The version is automatically retrieved from git tag by checkversion.exe (see C++ project)
which calls internally git describe --all
to retrieve version from last
annoted tag stored in the git tree. How to update the version:
- commit your changes
- perform an annoted tag with git : git tag -a v2.1.9.2 -m "v2.1.9.2". To perform an annoted tag operation with TortoiseGit, simply add a message like "v2.1.9.2" and Tortoise will automatically deduce it is an annoted tag.
- update the "vjoy.inx" file!!: look for %vjoy% = vjoy.Inst.Win7, root\VID_1234&PID_0FFB&REV_0222 and replace 0222 by the correct version.
The same procedure as below, but you need a valid EV certificate and select "Production Sign" in the Driver Signing page in each VS project file.
When updating your build system (like update from VSXX to VSYY), place the C++ dll dependencies in apps\External\DLL
Shaul gave a detailled explanation how the installer works: [http://vjoystick.sourceforge.net/site/index.php/dev216/installer] https://web.archive.org/web/20190509030210/http://vjoystick.sourceforge.net/site/index.php/dev216/installer
[http://vjoystick.sourceforge.net/site/index.php/download-a-install/deployment216/vjoy-installer] https://web.archive.org/web/20190509030211/http://vjoystick.sourceforge.net/site/index.php/download-a-install/deployment216/vjoy-installer
Once you have configured your Visual Studio to use a test certificate, you can deploy and debug your driver in a targtet - or test - computer. The target computer must run the same x86 or x64 architecture as your host.
Tutorial on Windows driver development:
https://www.harald-rosenfeldt.de/2019/05/25/windows-driver-development/
A good tutorial on how to setup your target computer and start a debug session is available here:
For network kernel debugging (KDNET), see also:
The recommanded debugger is WinDbg, that is available in the Microsoft Store.
https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/
A tutorial is given here:
To build in Debug mode, you need to change the BuildAll.bat script:
REM SET BuildMode=Release
SET BuildMode=Debug
If you want to see the traces in the driver's code, you need to remove all filtering in the debugger:
kd> ed nt!Kd_DEFAULT_MASK 0xFFFFFFFF
Please also check this page:
To load symbols, use the already builtin sympath, or add Microsoft's symbol server
.sympath srv*
.sympath srv*https://msdl.microsoft.com/download/symbols
To add your own symbols path (for example vJoy *.pdb files in c:\dev\vjoy\2.1.9.1\vJoy path), use
.sympath+ C:\dev\vjoy\2.1.9.1\vJoy
To reload symbols, use
.reload
(I do not recommand to add /f
to force retrieving, as lazy evaluation is faster)
To get information about vJoy module, type :
!drvobj vJoy
- Install Visual Studio 2013
- Install Visual Studio 2015 Update 3
- Install Windows 10 SDK 1511
- Install Windows 10 WDK 1511
- Install Windows 10 SDK 1607
- Install Windows 10 WDK 1607
- Install DotNet Framework 3.5 SP1
- Install DotNet Framework 3.5 SDK (6.0.6001.18000.367-KRMSDK_EN.iso)
- Install Innosetup 5
- Place the DigiCert Utility on the desktop.
- Copy the cfg_support_v1.lib file from C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\km\x86 and x64 to C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10586.0\km\x86 and x64