We have a network protocol stack which uses TDI to make IP connections
with a server, as well as an FSD and Network Provider (NP) so the user can
connect to the server’s shared volumes.
Under NT & Win2000, if an app calls WNetAddConnection to map a drive our
NP gets called at NPAddConnection which calls the stack which makes a TDI
connection to the server and starts a system thread to do TDI receive
requests. Everything works fine- the connection and several requests
succeed. But as soon as the app exits, the TDI receive request completes
with ‘request canceled’ and the connection is broken.
It appears something we are doing to setup the connection is bound to the
context of the app. Upon connection we are creating a thread to do the
TDI receives using PsCreateSystemThread() specifying NULL for the
ProcessHandle parameter so it should be in the system process.
Any ideas?
Ken
Are you opening the TDI handles in your system thread or in the
application’s thread before you kick off your system thread?
Thomas F. Divine
PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - TDI Client - Windows 95 Redirector
http:
----- Original Message -----
From:
To: NT Developers Interest List
Sent: Friday, July 21, 2000 1:03 PM
Subject: [ntdev] TDI connection breaks when initiating app quits
> We have a network protocol stack which uses TDI to make IP connections
> with a server, as well as an FSD and Network Provider (NP) so the user can
> connect to the server’s shared volumes.
>
> Under NT & Win2000, if an app calls WNetAddConnection to map a drive our
> NP gets called at NPAddConnection which calls the stack which makes a TDI
> connection to the server and starts a system thread to do TDI receive
> requests. Everything works fine- the connection and several requests
> succeed. But as soon as the app exits, the TDI receive request completes
> with ‘request canceled’ and the connection is broken.
>
> It appears something we are doing to setup the connection is bound to the
> context of the app. Upon connection we are creating a thread to do the
> TDI receives using PsCreateSystemThread() specifying NULL for the
> ProcessHandle parameter so it should be in the system process.
>
> Any ideas?
>
> Ken</http:>