Disable Com Port Fifo buffers

Discussion in 'Windows Vista Drivers' started by Dragomir, Jul 17, 2003.

  1. Dragomir

    Dragomir Guest

    How can I disable the fifo buffers of the com port? I try to use
    IOCTL_SERIAL_SET_FIFO_CONTROL and here is my code but it does not work:
    ULONG size = 0;



    //Steps

    //1. Build an IRP

    //2. Call the driver

    //3. Wait for it to complete


    KeInitializeEvent(&Event, NotificationEvent, FALSE);

    if(NULL == (pIrp =
    IoBuildDeviceIoControlRequest(IOCTL_SERIAL_SET_FIFO_CONTROL, BuddyDevice,
    &size, sizeof(ULONG), NULL, 0, FALSE, &Event, &ioStatus)))

    {

    return STATUS_INVALID_PARAMETER;

    }


    status = IoCallDriver(BuddyDevice, pIrp);

    if(STATUS_PENDING == status)

    {

    status = KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, // Not
    alertable

    NULL); // No timeout structure

    }

    if(!NT_SUCCESS(status))

    {

    return status;

    }


    KeClearEvent(&Event);
     
    Dragomir, Jul 17, 2003
    #1
    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.