symbolic link creation of WDM driver not working

Discussion in 'Windows Vista Drivers' started by vikas.sangani, Sep 21, 2006.

  1. Hi all,

    I have WDM filter driver.
    I want to access this driver from user mode.
    so I am creating symbolic link as follows in AddDevice routine.

    status = IoRegisterDeviceInterface (
    pdo,
    (LPGUID) &GUID_DEVINTERFACE_GRAPHITEUSB,
    NULL,
    &pdx->InterfaceName);

    if (!NT_SUCCESS (status))
    {
    IoDetachDevice(pdx->LowerDeviceObject);
    IoDeleteDevice (fido);
    return status;
    }

    IoSetDeviceInterfaceState( &pdx->InterfaceName, TRUE);


    I am enumerating interfaces from user mode application using toaster
    sample code provided with DDK. It uses following function. (I am using
    same GUID in driver and user mode application.)

    SetupDiGetClassDevs
    SetupDiEnumDeviceInterfaces
    SetupDiGetDeviceInterfaceDetail

    Using this I am able to get the symbolic link name.
    I am opening driver using CreateFile call using this symbolic link
    name.
    I successfully creates file in user mode but I driver does not get any
    create call.
    Again when i am calling ReadFile on this file handle, It says invalid
    parameter.

    So there is something wrong while createfile.

    If anybody can help me. Please reply.

    Regards,
    vikas sangani
     
    vikas.sangani, Sep 21, 2006
    #1
    1. Advertisements

  2. IoSetDeviceInterfaceState( &pdx->InterfaceName, TRUE);

    No, do this in MN_START_DEVICE.
     
    Maxim S. Shatskih, Sep 22, 2006
    #2
    1. Advertisements

  3. vikas.sangani

    Vicks Guest

    Hi Maxim,

    I have tested with putting IoSetDeviceInterfaceState call in
    IRP_MN_START_DEVICE.
    But it is still not working.
    -vikas sangani
     
    Vicks, Sep 22, 2006
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.