Hi Experts,

can any one expalin me,

1. Is it possible to use the TDI Client Drivers written for Xp,as is in
Vista ?
2. Or if with minor changes?
3. If it is possible to use same souce in VISTA , what are the function
calls/ arguments are need
to be changed?
4. Or i should move to KSOCKs ?


Thanks in Adv,

Re: TDI Problems in Windows VISTA ..Please help me!!!! by soviet_bloke

soviet_bloke
Wed Dec 27 01:43:31 CST 2006

> 1. Is it possible to use the TDI Client Drivers written for Xp,as is in
> Vista ?

Sure it is. At the same time, if you do it this way, you will get a
performance penalty, compared to WSK. The problem is that, under Vista,
TDI is implemented not by TCPIP.SYS but by TDX.SYS, which is WSK client
itself, while TCPIP.SYS is WSK provider.
In other words, you get an absolutely unnecessary extra layer, which
gives you some overhead

> 2. Or if with minor changes?
> 3. If it is possible to use same souce in VISTA , what are the function
> calls/ arguments are need
> to be changed?

As far as I understand, the very purpose of supporting TDI in Vista is
to make sure that client drivers written for W2KXP/W2K3 work under
Vista. Therefore, you would hardly need any changes

> 4. Or i should move to KSOCKs ?

It depends on your objectives. If you want to use the same source code
for Vista and earlier OS versions, you can stick to TDI. However, if
you are more interested in performance, then you should use WSK

Anton Bassov


ravinder.are@gmail.com wrote:
> Hi Experts,
>
> can any one expalin me,
>
> 1. Is it possible to use the TDI Client Drivers written for Xp,as is in
> Vista ?
> 2. Or if with minor changes?
> 3. If it is possible to use same souce in VISTA , what are the function
> calls/ arguments are need
> to be changed?
> 4. Or i should move to KSOCKs ?
>
>
> Thanks in Adv,


Re: TDI Problems in Windows VISTA ..Please help me!!!! by ravinder

ravinder
Wed Dec 27 03:30:09 CST 2006

Hi Soviet,

Thanks for u r valuable replay,

ultimately i will move to WSK, but in the mean, for demo purpose and
for other things i want to use the same source ...

In my TDI Client Driver opening the Transport Address is not failing
under VIsta,
where as the next call i.e opening TdiConnectionContext is failing .
the ZwCreateFile call is completing with STATUS_INVALID_PARAMETER.

I am not getting weather any parameter is wrong / any special care to
be taken to achieve successfull connection.

Please help me fixing this problem,

Thanks,

soviet_bloke@hotmail.com wrote:
> > 1. Is it possible to use the TDI Client Drivers written for Xp,as is in
> > Vista ?
>
> Sure it is. At the same time, if you do it this way, you will get a
> performance penalty, compared to WSK. The problem is that, under Vista,
> TDI is implemented not by TCPIP.SYS but by TDX.SYS, which is WSK client
> itself, while TCPIP.SYS is WSK provider.
> In other words, you get an absolutely unnecessary extra layer, which
> gives you some overhead
>
> > 2. Or if with minor changes?
> > 3. If it is possible to use same souce in VISTA , what are the function
> > calls/ arguments are need
> > to be changed?
>
> As far as I understand, the very purpose of supporting TDI in Vista is
> to make sure that client drivers written for W2KXP/W2K3 work under
> Vista. Therefore, you would hardly need any changes
>
> > 4. Or i should move to KSOCKs ?
>
> It depends on your objectives. If you want to use the same source code
> for Vista and earlier OS versions, you can stick to TDI. However, if
> you are more interested in performance, then you should use WSK
>
> Anton Bassov
>
>
> ravinder.are@gmail.com wrote:
> > Hi Experts,
> >
> > can any one expalin me,
> >
> > 1. Is it possible to use the TDI Client Drivers written for Xp,as is in
> > Vista ?
> > 2. Or if with minor changes?
> > 3. If it is possible to use same souce in VISTA , what are the function
> > calls/ arguments are need
> > to be changed?
> > 4. Or i should move to KSOCKs ?
> >
> >
> > Thanks in Adv,


Re: TDI Problems in Windows VISTA ..Please help me!!!! by Ivan

Ivan
Wed Dec 27 11:34:20 CST 2006

Can you show us the code
that fills-in the FILE_FULL_EA_INFORMATION
structure ?

Or, can you set a breakpoint in tdx!TdxCreateConnection
and see if the error comes from the MJ_CREATE or from the worker ?

--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


<ravinder.are@gmail.com> wrote in message
news:1167211809.899843.203460@n51g2000cwc.googlegroups.com...
> Hi Soviet,
>
> Thanks for u r valuable replay,
>
> ultimately i will move to WSK, but in the mean, for demo purpose and
> for other things i want to use the same source ...
>
> In my TDI Client Driver opening the Transport Address is not failing
> under VIsta,
> where as the next call i.e opening TdiConnectionContext is failing .
> the ZwCreateFile call is completing with STATUS_INVALID_PARAMETER.
>
> I am not getting weather any parameter is wrong / any special care to
> be taken to achieve successfull connection.
>
> Please help me fixing this problem,
>
> Thanks,
>
> soviet_bloke@hotmail.com wrote:
>> > 1. Is it possible to use the TDI Client Drivers written for Xp,as is in
>> > Vista ?
>>
>> Sure it is. At the same time, if you do it this way, you will get a
>> performance penalty, compared to WSK. The problem is that, under Vista,
>> TDI is implemented not by TCPIP.SYS but by TDX.SYS, which is WSK client
>> itself, while TCPIP.SYS is WSK provider.
>> In other words, you get an absolutely unnecessary extra layer, which
>> gives you some overhead
>>
>> > 2. Or if with minor changes?
>> > 3. If it is possible to use same souce in VISTA , what are the function
>> > calls/ arguments are need
>> > to be changed?
>>
>> As far as I understand, the very purpose of supporting TDI in Vista is
>> to make sure that client drivers written for W2KXP/W2K3 work under
>> Vista. Therefore, you would hardly need any changes
>>
>> > 4. Or i should move to KSOCKs ?
>>
>> It depends on your objectives. If you want to use the same source code
>> for Vista and earlier OS versions, you can stick to TDI. However, if
>> you are more interested in performance, then you should use WSK
>>
>> Anton Bassov
>>
>>
>> ravinder.are@gmail.com wrote:
>> > Hi Experts,
>> >
>> > can any one expalin me,
>> >
>> > 1. Is it possible to use the TDI Client Drivers written for Xp,as is in
>> > Vista ?
>> > 2. Or if with minor changes?
>> > 3. If it is possible to use same souce in VISTA , what are the function
>> > calls/ arguments are need
>> > to be changed?
>> > 4. Or i should move to KSOCKs ?
>> >
>> >
>> > Thanks in Adv,
>



Re: TDI Problems in Windows VISTA ..Please help me!!!! by ravinder

ravinder
Wed Dec 27 23:17:21 CST 2006

Hi Ivan ,
Thanks for replay,

here i am pasting the code snippet of my problem

//OBJECT_ATTRIBUTES oaTdiDriverNameAttributes
RtlInitUnicodeString(&usTdiDriverNameString, L"\\Device\\Tcp6");
InitializeObjectAttributes(&oaTdiDriverNameAttributes,
&usTdiDriverNameString,
OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL);


//PFILE_FULL_EA_INFORMATION pExtendedAttributesInformation
RtlCopyMemory(&pExtendedAttributesInformation->EaName,
TdiConnectionContext, TDI_CONNECTION_CONTEXT_LENGTH);

pExtendedAttributesInformation->EaNameLength =
TDI_CONNECTION_CONTEXT_LENGTH;
pExtendedAttributesInformation->EaValueLength =
TDI_CONNECTION_CONTEXT_LENGTH;

//now calling ZwCreateFile
NtStatus = ZwCreateFile( pTdiHandle,
FILE_READ_EA | FILE_WRITE_EA,
&oaTdiDriverNameAttributes,
&IoStatusBlock,
NULL,
FILE_ATTRIBUTE_NORMAL,
0,
FILE_OPEN_IF,
0,
pExtendedAttributesInformation,
dwEASize );


this ZwCreateFile is failing with STATUS_INVALID_PARAMETER..

Thanks,


Ivan Brugiolo [MSFT] wrote:
> Can you show us the code
> that fills-in the FILE_FULL_EA_INFORMATION
> structure ?
>
> Or, can you set a breakpoint in tdx!TdxCreateConnection
> and see if the error comes from the MJ_CREATE or from the worker ?
>
> --
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of any included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
>
>
> <ravinder.are@gmail.com> wrote in message
> news:1167211809.899843.203460@n51g2000cwc.googlegroups.com...
> > Hi Soviet,
> >
> > Thanks for u r valuable replay,
> >
> > ultimately i will move to WSK, but in the mean, for demo purpose and
> > for other things i want to use the same source ...
> >
> > In my TDI Client Driver opening the Transport Address is not failing
> > under VIsta,
> > where as the next call i.e opening TdiConnectionContext is failing .
> > the ZwCreateFile call is completing with STATUS_INVALID_PARAMETER.
> >
> > I am not getting weather any parameter is wrong / any special care to
> > be taken to achieve successfull connection.
> >
> > Please help me fixing this problem,
> >
> > Thanks,
> >
> > soviet_bloke@hotmail.com wrote:
> >> > 1. Is it possible to use the TDI Client Drivers written for Xp,as is in
> >> > Vista ?
> >>
> >> Sure it is. At the same time, if you do it this way, you will get a
> >> performance penalty, compared to WSK. The problem is that, under Vista,
> >> TDI is implemented not by TCPIP.SYS but by TDX.SYS, which is WSK client
> >> itself, while TCPIP.SYS is WSK provider.
> >> In other words, you get an absolutely unnecessary extra layer, which
> >> gives you some overhead
> >>
> >> > 2. Or if with minor changes?
> >> > 3. If it is possible to use same souce in VISTA , what are the function
> >> > calls/ arguments are need
> >> > to be changed?
> >>
> >> As far as I understand, the very purpose of supporting TDI in Vista is
> >> to make sure that client drivers written for W2KXP/W2K3 work under
> >> Vista. Therefore, you would hardly need any changes
> >>
> >> > 4. Or i should move to KSOCKs ?
> >>
> >> It depends on your objectives. If you want to use the same source code
> >> for Vista and earlier OS versions, you can stick to TDI. However, if
> >> you are more interested in performance, then you should use WSK
> >>
> >> Anton Bassov
> >>
> >>
> >> ravinder.are@gmail.com wrote:
> >> > Hi Experts,
> >> >
> >> > can any one expalin me,
> >> >
> >> > 1. Is it possible to use the TDI Client Drivers written for Xp,as is in
> >> > Vista ?
> >> > 2. Or if with minor changes?
> >> > 3. If it is possible to use same souce in VISTA , what are the function
> >> > calls/ arguments are need
> >> > to be changed?
> >> > 4. Or i should move to KSOCKs ?
> >> >
> >> >
> >> > Thanks in Adv,
> >


Re: TDI Problems in Windows VISTA ..Please help me!!!! by soviet_bloke

soviet_bloke
Thu Dec 28 00:57:03 CST 2006


Why do you use \\Device\\Tcp6"??? Do you want to use IPv6 packets???
Apparently, you got the idea from some misleading reply on OSR (I've
seen your thread there, and I have already posted a correction to that
reply).

What is the name that you copy from "TdiConnectionContext" to your
(&pExtendedAttributesInformation->EaName??? It should be a string
"ConnectionContext", and pExtendedAttributesInformation->EaNameLength
should exclude its NULL terminator.
Actual context (if any) should follow this string, and
pExtendedAttributesInformation->EaValueLength should indicate its size

Anton Bassov



ravinder.are@gmail.com wrote:
> Hi Ivan ,
> Thanks for replay,
>
> here i am pasting the code snippet of my problem
>
> //OBJECT_ATTRIBUTES oaTdiDriverNameAttributes
> RtlInitUnicodeString(&usTdiDriverNameString, L"\\Device\\Tcp6");
> InitializeObjectAttributes(&oaTdiDriverNameAttributes,
> &usTdiDriverNameString,
> OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL);
>
>
> //PFILE_FULL_EA_INFORMATION pExtendedAttributesInformation
> RtlCopyMemory(&pExtendedAttributesInformation->EaName,
> TdiConnectionContext, TDI_CONNECTION_CONTEXT_LENGTH);
>
> pExtendedAttributesInformation->EaNameLength =
> TDI_CONNECTION_CONTEXT_LENGTH;
> pExtendedAttributesInformation->EaValueLength =
> TDI_CONNECTION_CONTEXT_LENGTH;
>
> //now calling ZwCreateFile
> NtStatus = ZwCreateFile( pTdiHandle,
> FILE_READ_EA | FILE_WRITE_EA,
> &oaTdiDriverNameAttributes,
> &IoStatusBlock,
> NULL,
> FILE_ATTRIBUTE_NORMAL,
> 0,
> FILE_OPEN_IF,
> 0,
> pExtendedAttributesInformation,
> dwEASize );
>
>
> this ZwCreateFile is failing with STATUS_INVALID_PARAMETER..
>
> Thanks,
>
>
> Ivan Brugiolo [MSFT] wrote:
> > Can you show us the code
> > that fills-in the FILE_FULL_EA_INFORMATION
> > structure ?
> >
> > Or, can you set a breakpoint in tdx!TdxCreateConnection
> > and see if the error comes from the MJ_CREATE or from the worker ?
> >
> > --
> > --
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> > Use of any included script samples are subject to the terms specified at
> > http://www.microsoft.com/info/cpyright.htm
> >
> >
> > <ravinder.are@gmail.com> wrote in message
> > news:1167211809.899843.203460@n51g2000cwc.googlegroups.com...
> > > Hi Soviet,
> > >
> > > Thanks for u r valuable replay,
> > >
> > > ultimately i will move to WSK, but in the mean, for demo purpose and
> > > for other things i want to use the same source ...
> > >
> > > In my TDI Client Driver opening the Transport Address is not failing
> > > under VIsta,
> > > where as the next call i.e opening TdiConnectionContext is failing .
> > > the ZwCreateFile call is completing with STATUS_INVALID_PARAMETER.
> > >
> > > I am not getting weather any parameter is wrong / any special care to
> > > be taken to achieve successfull connection.
> > >
> > > Please help me fixing this problem,
> > >
> > > Thanks,
> > >
> > > soviet_bloke@hotmail.com wrote:
> > >> > 1. Is it possible to use the TDI Client Drivers written for Xp,as is in
> > >> > Vista ?
> > >>
> > >> Sure it is. At the same time, if you do it this way, you will get a
> > >> performance penalty, compared to WSK. The problem is that, under Vista,
> > >> TDI is implemented not by TCPIP.SYS but by TDX.SYS, which is WSK client
> > >> itself, while TCPIP.SYS is WSK provider.
> > >> In other words, you get an absolutely unnecessary extra layer, which
> > >> gives you some overhead
> > >>
> > >> > 2. Or if with minor changes?
> > >> > 3. If it is possible to use same souce in VISTA , what are the function
> > >> > calls/ arguments are need
> > >> > to be changed?
> > >>
> > >> As far as I understand, the very purpose of supporting TDI in Vista is
> > >> to make sure that client drivers written for W2KXP/W2K3 work under
> > >> Vista. Therefore, you would hardly need any changes
> > >>
> > >> > 4. Or i should move to KSOCKs ?
> > >>
> > >> It depends on your objectives. If you want to use the same source code
> > >> for Vista and earlier OS versions, you can stick to TDI. However, if
> > >> you are more interested in performance, then you should use WSK
> > >>
> > >> Anton Bassov
> > >>
> > >>
> > >> ravinder.are@gmail.com wrote:
> > >> > Hi Experts,
> > >> >
> > >> > can any one expalin me,
> > >> >
> > >> > 1. Is it possible to use the TDI Client Drivers written for Xp,as is in
> > >> > Vista ?
> > >> > 2. Or if with minor changes?
> > >> > 3. If it is possible to use same souce in VISTA , what are the function
> > >> > calls/ arguments are need
> > >> > to be changed?
> > >> > 4. Or i should move to KSOCKs ?
> > >> >
> > >> >
> > >> > Thanks in Adv,
> > >


Re: TDI Problems in Windows VISTA ..Please help me!!!! by ravinder

ravinder
Thu Dec 28 04:00:25 CST 2006

Hi Soviet,

yeah i corrected it to \\Device\\Tcp
and also i modified the FILE_FULL_EA_INFORMATION structure filling
and the parameters in ZwCreateFile Call,
Now its working fine,

Thanks a lot for u r support in fixing this problem,

Ravinder Are

soviet_bloke@hotmail.com wrote:
> Why do you use \\Device\\Tcp6"??? Do you want to use IPv6 packets???
> Apparently, you got the idea from some misleading reply on OSR (I've
> seen your thread there, and I have already posted a correction to that
> reply).
>
> What is the name that you copy from "TdiConnectionContext" to your
> (&pExtendedAttributesInformation->EaName??? It should be a string
> "ConnectionContext", and pExtendedAttributesInformation->EaNameLength
> should exclude its NULL terminator.
> Actual context (if any) should follow this string, and
> pExtendedAttributesInformation->EaValueLength should indicate its size
>
> Anton Bassov
>
>
>
> ravinder.are@gmail.com wrote:
> > Hi Ivan ,
> > Thanks for replay,
> >
> > here i am pasting the code snippet of my problem
> >
> > //OBJECT_ATTRIBUTES oaTdiDriverNameAttributes
> > RtlInitUnicodeString(&usTdiDriverNameString, L"\\Device\\Tcp6");
> > InitializeObjectAttributes(&oaTdiDriverNameAttributes,
> > &usTdiDriverNameString,
> > OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, NULL, NULL);
> >
> >
> > //PFILE_FULL_EA_INFORMATION pExtendedAttributesInformation
> > RtlCopyMemory(&pExtendedAttributesInformation->EaName,
> > TdiConnectionContext, TDI_CONNECTION_CONTEXT_LENGTH);
> >
> > pExtendedAttributesInformation->EaNameLength =
> > TDI_CONNECTION_CONTEXT_LENGTH;
> > pExtendedAttributesInformation->EaValueLength =
> > TDI_CONNECTION_CONTEXT_LENGTH;
> >
> > //now calling ZwCreateFile
> > NtStatus = ZwCreateFile( pTdiHandle,
> > FILE_READ_EA | FILE_WRITE_EA,
> > &oaTdiDriverNameAttributes,
> > &IoStatusBlock,
> > NULL,
> > FILE_ATTRIBUTE_NORMAL,
> > 0,
> > FILE_OPEN_IF,
> > 0,
> > pExtendedAttributesInformation,
> > dwEASize );
> >
> >
> > this ZwCreateFile is failing with STATUS_INVALID_PARAMETER..
> >
> > Thanks,
> >
> >
> > Ivan Brugiolo [MSFT] wrote:
> > > Can you show us the code
> > > that fills-in the FILE_FULL_EA_INFORMATION
> > > structure ?
> > >
> > > Or, can you set a breakpoint in tdx!TdxCreateConnection
> > > and see if the error comes from the MJ_CREATE or from the worker ?
> > >
> > > --
> > > --
> > > This posting is provided "AS IS" with no warranties, and confers no rights.
> > > Use of any included script samples are subject to the terms specified at
> > > http://www.microsoft.com/info/cpyright.htm
> > >
> > >
> > > <ravinder.are@gmail.com> wrote in message
> > > news:1167211809.899843.203460@n51g2000cwc.googlegroups.com...
> > > > Hi Soviet,
> > > >
> > > > Thanks for u r valuable replay,
> > > >
> > > > ultimately i will move to WSK, but in the mean, for demo purpose and
> > > > for other things i want to use the same source ...
> > > >
> > > > In my TDI Client Driver opening the Transport Address is not failing
> > > > under VIsta,
> > > > where as the next call i.e opening TdiConnectionContext is failing .
> > > > the ZwCreateFile call is completing with STATUS_INVALID_PARAMETER.
> > > >
> > > > I am not getting weather any parameter is wrong / any special care to
> > > > be taken to achieve successfull connection.
> > > >
> > > > Please help me fixing this problem,
> > > >
> > > > Thanks,
> > > >
> > > > soviet_bloke@hotmail.com wrote:
> > > >> > 1. Is it possible to use the TDI Client Drivers written for Xp,as is in
> > > >> > Vista ?
> > > >>
> > > >> Sure it is. At the same time, if you do it this way, you will get a
> > > >> performance penalty, compared to WSK. The problem is that, under Vista,
> > > >> TDI is implemented not by TCPIP.SYS but by TDX.SYS, which is WSK client
> > > >> itself, while TCPIP.SYS is WSK provider.
> > > >> In other words, you get an absolutely unnecessary extra layer, which
> > > >> gives you some overhead
> > > >>
> > > >> > 2. Or if with minor changes?
> > > >> > 3. If it is possible to use same souce in VISTA , what are the function
> > > >> > calls/ arguments are need
> > > >> > to be changed?
> > > >>
> > > >> As far as I understand, the very purpose of supporting TDI in Vista is
> > > >> to make sure that client drivers written for W2KXP/W2K3 work under
> > > >> Vista. Therefore, you would hardly need any changes
> > > >>
> > > >> > 4. Or i should move to KSOCKs ?
> > > >>
> > > >> It depends on your objectives. If you want to use the same source code
> > > >> for Vista and earlier OS versions, you can stick to TDI. However, if
> > > >> you are more interested in performance, then you should use WSK
> > > >>
> > > >> Anton Bassov
> > > >>
> > > >>
> > > >> ravinder.are@gmail.com wrote:
> > > >> > Hi Experts,
> > > >> >
> > > >> > can any one expalin me,
> > > >> >
> > > >> > 1. Is it possible to use the TDI Client Drivers written for Xp,as is in
> > > >> > Vista ?
> > > >> > 2. Or if with minor changes?
> > > >> > 3. If it is possible to use same souce in VISTA , what are the function
> > > >> > calls/ arguments are need
> > > >> > to be changed?
> > > >> > 4. Or i should move to KSOCKs ?
> > > >> >
> > > >> >
> > > >> > Thanks in Adv,
> > > >