serial port IOCTL_SERIAL_GET_HANDFLOW PROBLEM

i am writing a driver for a device which exports its interface a serial
port.it is actually a sub device.the problem is after looknig at fake modem
ioctls and reading trough othert stuff .i have successfully added all the
ioctls support/
my device was working fine with TERA TERM.but when i tried to open the
device using HYPERTERM.it didnt work. i took a log ande found out that
hyperterminal needs SERIAL HANDFLOW STRUCTURE to work .so i added that as
well along with DTR And RTS SET and CLEAR IOCTLS so now the code is

case IOCTL_SERIAL_SET_DTR:
{
pDevExt->handflow.ControlHandShake=pDevExt->handflow.ControlHandShake|SERIAL_DTR_MASK;
pDevExt->handflow.ControlHandShake=pDevExt->handflow.ControlHandShake&(~SERIAL_DTR_HANDSHAKE);
info=0;
status=STATUS_SUCCESS;
break;
}
case IOCTL_SERIAL_CLR_DTR:
{
pDevExt->handflow.ControlHandShake=pDevExt->handflow.ControlHandShake&(~SERIAL_DTR_MASK);
pDevExt->handflow.ControlHandShake=pDevExt->handflow.ControlHandShake|SERIAL_DTR_HANDSHAKE;
info=0;
status=STATUS_SUCCESS;
break;
}
case IOCTL_SERIAL_RESET_DEVICE:
case IOCTL_SERIAL_SET_RTS:
{
pDevExt->handflow.FlowReplace=pDevExt->handflow.FlowReplace|SERIAL_RTS_MASK;
pDevExt->handflow.FlowReplace=pDevExt->handflow.FlowReplace&(~SERIAL_RTS_HANDSHAKE);
info=0;
status=STATUS_SUCCESS;
break;
}
case IOCTL_SERIAL_CLR_RTS:
{
pDevExt->handflow.FlowReplace=pDevExt->handflow.FlowReplace&(~SERIAL_RTS_MASK);
pDevExt->handflow.FlowReplace=pDevExt->handflow.FlowReplace|SERIAL_RTS_HANDSHAKE;
info=0;
status=STATUS_SUCCESS;
break;
}
case IOCTL_SERIAL_SET_XOFF:
case IOCTL_SERIAL_SET_XON:
case IOCTL_SERIAL_SET_BREAK_ON:
case IOCTL_SERIAL_SET_BREAK_OFF:
{
info=0;
status=STATUS_SUCCESS;
break;
}

case IOCTL_SERIAL_SET_HANDFLOW :
{
PSERIAL_HANDFLOW hnd;
status = WdfRequestRetrieveOutputBuffer ( Request,
sizeof(SERIAL_HANDFLOW),
&buffer, &bufSize );
if( !NT_SUCCESS(status) )
{
#if DBG
DbgPrint( “Could not get request memory buffer %X\n”, status);
#endif
break;
}
hnd = (PSERIAL_HANDFLOW)buffer;

pDevExt->handflow.ControlHandShake|=hnd->ControlHandShake;
pDevExt->handflow.FlowReplace|=hnd->FlowReplace;
pDevExt->handflow.XoffLimit|=hnd->XoffLimit;
pDevExt->handflow.XonLimit|=hnd->XonLimit;
info=sizeof(SERIAL_HANDFLOW);
break;
}
case IOCTL_SERIAL_GET_HANDFLOW:
{
PSERIAL_HANDFLOW hnd;
status = WdfRequestRetrieveOutputBuffer ( Request,
sizeof(SERIAL_HANDFLOW),
&buffer, &bufSize );
if( !NT_SUCCESS(status) )
{
#if DBG
DbgPrint( “Could not get request memory buffer %X\n”, status);
#endif
break;
}
hnd = (PSERIAL_HANDFLOW)buffer;

hnd->ControlHandShake=pDevExt->handflow.ControlHandShake;
hnd->FlowReplace=pDevExt->handflow.FlowReplace;
hnd->XoffLimit=pDevExt->handflow.XoffLimit;
hnd->XonLimit=pDevExt->handflow.XonLimit;
info=sizeof(SERIAL_HANDFLOW);
break;
}

and the calls generated by both TERA TERM and HYPERTERMINAL are

IOCTL_SERIAL_GET_COMMSTATUS for: 76A489A8
IOCTL_SERIAL_SET_QUEUE_SIZE for: 76A489A8
IOCTL_SERIAL_PURGE for: 76A489A8
IOCTL_SERIAL_SET_TIMEOUTS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_CLR_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
and it goes on and on. cna anyone tell me how to modify this code so that it
would work .

I

i am getting the feeling that i ma missing something big .so could anyone
just please put me in the right direction.

On Tue, Sep 15, 2009 at 2:48 PM, shahzad iqbal
wrote:

> i am writing a driver for a device which exports its interface a serial
> port.it is actually a sub device.the problem is after looknig at fake
> modem ioctls and reading trough othert stuff .i have successfully added all
> the ioctls support/
> my device was working fine with TERA TERM.but when i tried to open the
> device using HYPERTERM.it didnt work. i took a log ande found out that
> hyperterminal needs SERIAL HANDFLOW STRUCTURE to work .so i added that as
> well along with DTR And RTS SET and CLEAR IOCTLS so now the code is
>
>
>
> case IOCTL_SERIAL_SET_DTR:
> {
>
> pDevExt->handflow.ControlHandShake=pDevExt->handflow.ControlHandShake|SERIAL_DTR_MASK;
>
> pDevExt->handflow.ControlHandShake=pDevExt->handflow.ControlHandShake&(~SERIAL_DTR_HANDSHAKE);
> info=0;
> status=STATUS_SUCCESS;
> break;
> }
> case IOCTL_SERIAL_CLR_DTR:
> {
>
> pDevExt->handflow.ControlHandShake=pDevExt->handflow.ControlHandShake&(~SERIAL_DTR_MASK);
>
> pDevExt->handflow.ControlHandShake=pDevExt->handflow.ControlHandShake|SERIAL_DTR_HANDSHAKE;
> info=0;
> status=STATUS_SUCCESS;
> break;
> }
> case IOCTL_SERIAL_RESET_DEVICE:
> case IOCTL_SERIAL_SET_RTS:
> {
>
> pDevExt->handflow.FlowReplace=pDevExt->handflow.FlowReplace|SERIAL_RTS_MASK;
>
> pDevExt->handflow.FlowReplace=pDevExt->handflow.FlowReplace&(~SERIAL_RTS_HANDSHAKE);
> info=0;
> status=STATUS_SUCCESS;
> break;
> }
> case IOCTL_SERIAL_CLR_RTS:
> {
>
> pDevExt->handflow.FlowReplace=pDevExt->handflow.FlowReplace&(~SERIAL_RTS_MASK);
>
> pDevExt->handflow.FlowReplace=pDevExt->handflow.FlowReplace|SERIAL_RTS_HANDSHAKE;
> info=0;
> status=STATUS_SUCCESS;
> break;
> }
> case IOCTL_SERIAL_SET_XOFF:
> case IOCTL_SERIAL_SET_XON:
> case IOCTL_SERIAL_SET_BREAK_ON:
> case IOCTL_SERIAL_SET_BREAK_OFF:
> {
> info=0;
> status=STATUS_SUCCESS;
> break;
> }
>
> case IOCTL_SERIAL_SET_HANDFLOW :
> {
> PSERIAL_HANDFLOW hnd;
> status = WdfRequestRetrieveOutputBuffer ( Request,
> sizeof(SERIAL_HANDFLOW),
> &buffer, &bufSize );
> if( !NT_SUCCESS(status) )
> {
> #if DBG
> DbgPrint( “Could not get request memory buffer %X\n”, status);
> #endif
> break;
> }
> hnd = (PSERIAL_HANDFLOW)buffer;
>
> pDevExt->handflow.ControlHandShake|=hnd->ControlHandShake;
> pDevExt->handflow.FlowReplace|=hnd->FlowReplace;
> pDevExt->handflow.XoffLimit|=hnd->XoffLimit;
> pDevExt->handflow.XonLimit|=hnd->XonLimit;
> info=sizeof(SERIAL_HANDFLOW);
> break;
> }
> case IOCTL_SERIAL_GET_HANDFLOW:
> {
> PSERIAL_HANDFLOW hnd;
> status = WdfRequestRetrieveOutputBuffer ( Request,
> sizeof(SERIAL_HANDFLOW),
> &buffer, &bufSize );
> if( !NT_SUCCESS(status) )
> {
> #if DBG
> DbgPrint( “Could not get request memory buffer %X\n”, status);
> #endif
> break;
> }
> hnd = (PSERIAL_HANDFLOW)buffer;
>
> hnd->ControlHandShake=pDevExt->handflow.ControlHandShake;
> hnd->FlowReplace=pDevExt->handflow.FlowReplace;
> hnd->XoffLimit=pDevExt->handflow.XoffLimit;
> hnd->XonLimit=pDevExt->handflow.XonLimit;
> info=sizeof(SERIAL_HANDFLOW);
> break;
> }
>
> and the calls generated by both TERA TERM and HYPERTERMINAL are
>
> IOCTL_SERIAL_GET_COMMSTATUS for: 76A489A8
> IOCTL_SERIAL_SET_QUEUE_SIZE for: 76A489A8
> IOCTL_SERIAL_PURGE for: 76A489A8
> IOCTL_SERIAL_SET_TIMEOUTS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_CLR_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_SET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
> IOCTL_SERIAL_GET_CHARS for: 76A489A8
> IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8
> IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
> IOCTL_SERIAL_SET_RTS for: 76A489A8
> IOCTL_SERIAL_SET_DTR for: 76A489A8
> and it goes on and on. cna anyone tell me how to modify this code so that
> it would work .
>
> I
>

shahzad iqbal wrote:

i took a log ande found out that hyperterminal needs SERIAL HANDFLOW
STRUCTURE to work

You’re going about this the wrong way. Hyperterminal doesn’t “need” SERIAL_HANDFLOW, it doesn’t even really know about that IOCTL. In fact, it might not even know about SetCommConfig(), if it’s just using TAPI. Implementing the various IOCTLs and timeout semantics, correctly, is not optional in a true serial driver. You need to do *all* of them (actually more than all of them if you are doing a USB serial driver). If you can’t even open your driver in Hyperterminal, you’ve got a long way to go.

Anyway, look at your SET_HANDFLOW code. You’re asking for the output buffer, even though SET_HANDFLOW is going to be giving *you* data. Don’t you want the input buffer in that case? (I realize this may not matter because it’s METHOD_BUFFERED, but…) Additionally, why do you try to do bitwise operations on the field members? Just do a memcpy and be done with it.

Ok i am going to fix the set hand flow problem .but used irp tracker
to find out what ioctl hyperterm generates for a standard device .they
are about 10 of them in a sequence before it says it has opened the
device .my device type is serialport when i register it in adddevice .
I have seen fakemodem in wdk and it doesnt even implement serial handflow ioctl.
What should i do to get there

On 9/15/09, xxxxx@gmail.com wrote:
> shahzad iqbal wrote:
>
>> i took a log ande found out that hyperterminal needs SERIAL HANDFLOW
>> STRUCTURE to work
>
> You’re going about this the wrong way. Hyperterminal doesn’t “need”
> SERIAL_HANDFLOW, it doesn’t even really know about that IOCTL. In fact, it
> might not even know about SetCommConfig(), if it’s just using TAPI.
> Implementing the various IOCTLs and timeout semantics, correctly, is not
> optional in a true serial driver. You need to do all of them (actually
> more than all of them if you are doing a USB serial driver). If you can’t
> even open your driver in Hyperterminal, you’ve got a long way to go.
>
> Anyway, look at your SET_HANDFLOW code. You’re asking for the output
> buffer, even though SET_HANDFLOW is going to be giving you data. Don’t
> you want the input buffer in that case? (I realize this may not matter
> because it’s METHOD_BUFFERED, but…) Additionally, why do you try to do
> bitwise operations on the field members? Just do a memcpy and be done with
> it.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

shahzad iqbal wrote:

Ok i am going to fix the set hand flow problem .but used irp tracker
to find out what ioctl hyperterm generates for a standard device .they
are about 10 of them in a sequence before it says it has opened the
device .my device type is serialport when i register it in adddevice .
I have seen fakemodem in wdk and it doesnt even implement serial handflow ioctl.
What should i do to get there

Just because HyperTerminal makes a particular ioctl request does not
necessarily mean that it expects it to succeed.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>

ok i have worked out a bit more.

  1. standard Serial ports usually use use symmbolic link
    SERIALCOMM.i ma using something else.
    2)if you take a look at the log.ap pattern repeates after first 3 calls.
    "
    IOCTL_SERIAL_GET_COMMSTATUS for: 76A489A8
    IOCTL_SERIAL_SET_QUEUE_SIZE for: 76A489A8
    IOCTL_SERIAL_PURGE for: 76A489A8
    IOCTL_SERIAL_SET_TIMEOUTS for: 76A489A8

IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8

IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8

IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8

IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_CLR_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8
IOCTL_SERIAL_SET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_SET_CHARS for: 76A489A8

IOCTL_SERIAL_GET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_GET_LINE_CONTROL for: 76A489A8
IOCTL_SERIAL_GET_CHARS for: 76A489A8
IOCTL_SERIAL_GET_HANDFLOW for: 76A489A8

IOCTL_SERIAL_SET_BAUD_RATE for: 76A489A8
IOCTL_SERIAL_SET_RTS for: 76A489A8
IOCTL_SERIAL_SET_DTR for: 76A489A8"

the above happens if i return STATUS SUCCESS
for IOCTL_SERIAL_GET_HANDFLOW
and if i return
STATUS_INVALID_PARAMETER
for IOCTL_SERIAL_GET_HANDFLOW .hyper terminal straight away says that it
is unable to open the device.

On Wed, Sep 16, 2009 at 3:04 AM, Tim Roberts wrote:
>
>> shahzad iqbal wrote:
>> > Ok i am going to fix the set hand flow problem .but used irp tracker
>> > to find out what ioctl hyperterm generates for a standard device .they
>> > are about 10 of them in a sequence before it says it has opened the
>> > device .my device type is serialport when i register it in adddevice .
>> > I have seen fakemodem in wdk and it doesnt even implement serial
>> handflow ioctl.
>> > What should i do to get there
>> >
>>
>> Just because HyperTerminal makes a particular ioctl request does not
>> necessarily mean that it expects it to succeed.
>>
>> –
>> Tim Roberts, xxxxx@probo.com
>> Providenza & Boekelheide, Inc.
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>
>

shahzad iqbal wrote:

and if i return STATUS_INVALID_PARAMETER for
IOCTL_SERIAL_GET_HANDFLOW .hyper terminal
straight away says that it is unable to open the device.

You failed the I/O, and now the application complains. Quite shocking, isn’t it?

You need to go to two pages:

  1. http://msdn.microsoft.com/en-us/library/aa910115.aspx

  2. http://msdn.microsoft.com/en-us/library/aa909018.aspx

…and decide if you are willing and able to read, understand, and implement all the material shown. If not, well, maybe you should ask yourself why you’re writing *yet another* USB serial driver in the first place.

Not to mention, SERIAL_HANDFLOW is just the highest tip of the iceberg (and is really trivial to implement), so you face far greater challenges ahead…