Who has successfully run the VirtualSerial2 driver sample? I failed.

Paul Sievers 20 Reputation points
2024-11-02T09:38:43.2733333+00:00

If you have experience in producing and running the VirtualSerial2 driver sample, please share it with me!

Here are my (frustrating) experiences:

Windows 11 Pro (23H2)

Microsoft Visual Studio Community 2022

VisualStudio.17.Release/17.10.4+35027.167

Visual C++ 2022 00482-90000-00000-AA903

Windows Software Development Kit - Windows 10.0.26100.0

Windows Driver Kit 10.0.22621.311

Compilation fails with: error C1083: Cannot open include file: 'wudfddi.h': No such file or directory

I added include directory C:\Program Files (x86)\Windows Kits\10\Include\wdf\umdf\2.33

Compilation still fails with many errors, e.g.:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared\ntddser.h(635,9): error C2220: the following warning is treated as an error

C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared\ntddser.h(635,9): warning C4005: 'SERIAL_LSRMST_ESCAPE': macro redefinition

I added "#define WIN32_LEAN_AND_MEAN" before "#include <windows.h>". Compilation succeeds but linking fails with unresolved references

I added mincore.lib, ntdll.lib and WdfDriverStubUm.lib to the linker input. Linking succeeded.

I created a driver package with the commands:

cd C:\Users\DTMLLUAdminUser\VirtualSerial2\ComPort

copy virtualserial2um.inx x64\Debug\Package\virtualserial2um.inf

copy x64\Debug\virtualserial2um.dll x64\Debug\Package

cd x64\Debug\Package

"C:\Program Files (x86)\Windows Kits\10\bin\x64\stampinf.exe" -f virtualserial2um.inf -a "amd64" -d "*" -u "2.33.0" -v "3.20"

"C:\Program Files (x86)\Windows Kits\10\bin\x86\Inf2Cat.exe" /os:"10_x64" /driver:.

I installed the driver and got a success response. Attached is setupapi.dev.log which contains the information that was produced during this installation.

However, there was no COM-port in the DeviceManager. So, this driver does not seem to work.

Windows Driver Kit (WDK)
Windows Driver Kit (WDK)
A set of Microsoft tools that are used to develop, test, and deploy Windows drivers.
121 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.