AllocateBlockOfTasks
Returns a unique set of task numbers for the exclusive use of the requesting NLM
#include <nwcntask.h>
LONG AllocateBlockOfTasks (
LONG numberWanted);
This function returns the first task number in the set. It returns a value of 0 if no task numbers are available.
Several entities can make requests to NetWare® 3.x and above using a given connection number. Unique task numbers enable the calling NLM to use a connection number without any danger of conflict with other entities using that same connection. AllocateBlockOfTasks returns a unique set of task numbers, ensuring that the connection number/task number combination of the NLM is unique.
AllocateBlockOfTasks allocates the requested number of consecutive task numbers on the current connection for exclusive use by the NLM. An NLM that meets the following criteria would call this function:
The SetCurrentTask function should be used if the NLM needs only one task.