The NetCharDevQPurgeSelf API deletes from a serial device queue all pending requests that were submitted by a particular computer.
The NetCharDevQPurgeSelf function deletes all requests that the NetCharDevQPurge function specifies, except that only requests from computername are deleted. A process that currently has a device open is unaffected.
Restrictions
This API can be called from DLS and OS/2 workstations, but only DLS can issue this call to a remote LAN Server workstation. Administrator authority is required to delete requests from other computers when NetCharDevQPurgeSelf is called remotely. No administrator authority is required to delete a queue that was originated by the caller.
#include <netcons.h> #include <chardev.h> NetCharDevQPurgeSelf(pszServername, pszQueueName, computername); /* 16 bit */ Net32CharDevQPurgeSelf(pszServername, pszQueueName, computername); /* 32 bit */Parameters
See Common Parameter Definitions for descriptions of parameters not defined here.
pszQueueName
The following table lists the return codes most significant to this API.
(See API Return Codes for a complete
list of return codes.) ┌─────────────────────────────┬───────┬────────────────────────────────────────┐│SYMBOLICCONSTANT
│VALUE│MEANING │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_Success │ 0 │ No errors were encountered. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_ACCESS_DENIED │ 5 │ Administrator privilege is required. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_BAD_NETPATH │ 53 │ The network path cannot be found. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_NETWORK_ACCESS_DENIED │ 65 │ Network access is denied. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_SEM_TIMEOUT │ 121 │ A timeout happened from the semaphore
│
│ │ │ API functions. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_INVALID_NAME │ 123 │ There is an incorrect character or │
│ │ │ incorrectly formed file system name. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_NetNotStarted │ 2102 │ The redirector NETWKSTA.200 has not
│
│ │ │ been started. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_RemoteOnly │ 2106 │ This operation is not supported on │
│ │ │ workstations. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_ServerNotStarted │ 2114 │ The Server service has not been
│
│ │ │ started. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_ItemNotFound │ 2115 │ The device queue is empty. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_WkstaNotStarted │ 2138 │ The Requester service has not been
│
│ │ │ started. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_InternalError │ 2140 │ An internal error has occurred. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_NoCommDevs │ 2337 │ There are no shared communication │
│ │ │ devices. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_QueueNotFound │ 2338 │ A queue does not exist for this │
│ │ │ request. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_InvalidComputer │ 2351 │ The specified computer name is not
│
│ │ │ valid. │
└─────────────────────────────┴───────┴────────────────────────────────────────┘
Other codes could be returned from the following functions:
For information about: