Does the MSVC support C++20 modules for Windows driver projects ?
0xlay Lab
1
Reputation point
Does the MSVC support C++20 modules for Windows driver projects ?
I enabled C++20 and compiled project, but I taked error (C3474 could not open file DriverModule.ifc). I tried to added path in "[Additional Module dependecies]: $(ProjectDir)DriverModule.ifc", but it wasn't fixing error.
DriverModule.ixx
export module DriverModule;
export int calculate(int x);
DriverModule.cpp
module DriverModule;
int calculate(int x)
{
return x + 10;
}
EntryPoint.cpp
#include <wdm.h>
import DriverModule;
extern "C" NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath);
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
UNREFERENCED_PARAMETER(DriverObject);
UNREFERENCED_PARAMETER(RegistryPath);
int b = calculate(28);
KdPrint(("%d", b));
return STATUS_SUCCESS;
}
Sign in to answer