Hi LIU Hao,
Thanks for you fast answer comments below.
Am 25.10.24 um 06:00 schrieb LIU Hao:
在 2024-10-24 19:26, Johannes Khoshnazar-Thoma 写道:
Hi List,
I am writing a Windows kernel driver that should use wdmsec (in particular
IoCreateDeviceSecure(). I found the wdmsec.h header but I can't find some
libwdmsec.a to link against, so linking fails.
Is wdmsec supported by mingw64? How should I link it? If it is not supported,
can I make it supported somehow (willing to hack .def files, ...),
DDK headers are not actively maintained and I don't know how much usability
there is.
Windows Driver Kit provides wdmsec as a static library. There does not seem to
be wdmsec in Wine or ReactOS, either.
So far the only option seems to be that you can link the LIB from Windows
Driver Kit (that's usually supported), which can be installed with Visual
Studio Installer.
I tried to link against the WDMSEC.LIB from the Ewdk but it looks like the
linker does not understand (part of) the archive:
The error message is:
/home/johannes/.zeranoe/mingw-w64/x86_64/lib/gcc/x86_64-w64-mingw32/12.3.1/../../../../x86_64-w64-mingw32/bin/ld:
wdmsec.lib: error adding symbols: file format not recognized
Runnin nm on the wdmsec.lib file shows that it appears to be the ntoskrnl.exe
objects:
../.zeranoe/mingw-w64/x86_64/bin/x86_64-w64-mingw32-nm: ntoskrnl.exe: file
format not recognized
I tried mingw_genlib but unfortunately this tool segfaulted:
mingw-genlib -a x86_64 wdmsec.lib
Segmentation fault
Do I miss something obvious? As I understand mingw-genlib comverts a wdmsec.lib
to a linwdmsec.a, right? So if I convert the lib to the .a then in theory the
mingw linker should recognize the libraru (with -lwdmsec). If this is the case
I would try to fix the Segfault and convert the file, please let me know if that
is a good way to go,
Thanks a lot,
- Johannes
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public