0

I try to create a software virtual COM-port without the com0com or other apps. I try to use a fakemodem example. The DriverEntry function is:

NTSTATUS DriverEntry(
           IN PDRIVER_OBJECT  DriverObject,
           IN PUNICODE_STRING RegistryPath
           )
{
    NTSTATUS            status = STATUS_SUCCESS;
    WDF_DRIVER_CONFIG   config;
    KdPrint(("Fakemode Function Driver Sample - Driver Framework Edition.\n"));
    KdPrint(("Built %s %s\n", __DATE__, __TIME__));
    WDF_DRIVER_CONFIG_INIT( &config, FmEvtDeviceAdd );
    status = WdfDriverCreate(
                            DriverObject,
                            RegistryPath,
                            WDF_NO_OBJECT_ATTRIBUTES,
                            &config,          // Driver Config Info
                            WDF_NO_HANDLE
                            );
    if (!NT_SUCCESS(status)) {
        KdPrint( ("WdfDriverCreate failed with status 0x%x\n", status));
    }
    return status;
}

How can I use the fakemodem driver from the main() function of my user-space application? How to add a new device with the fakemodem.sys in the main() ?

Arseniy
  • 266
  • 2
  • 14

0 Answers0