DisableConnection
Temporarily prevents the server from servicing any requests (except requests made by the calling NLM) for the specified connection number
#include <nwcntask.h>
int DisableConnection (
LONG connection);
The following table lists return values and descriptions.
The DisableConnection function reserves the specified connection number solely for the use of the NLM. It prevents both the workstation and other NLM applications from using the connection number. However, other NLM applications must cooperate by also calling this function.
While the connection is temporarily disabled, the NLM can perform file service functions without any conflict from the workstation or other NLM applications. Disable a connection number for only a short period.
Once the NLM has used the specified connection number, the NLM should call EnableConnection, allowing the server to again service requests for the specified connection number.
An NLM should check the completion code of this function to make sure another NLM does not already have the connection disabled, or is otherwise in an incompatible state (such as disconnecting or processing an NCP request).