NWSendNCPExtensionRequest

Sends a request to the specified NCP extension

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM
Service:NCP Extension

Syntax

  #include <nlm\nwncpx.h>  
   
  int NWSendNCPExtensionRequest  (  
     LONG         NCPExtensionID,   
     const void  *requestData,   
     LONG         requestDataLen,   
     void        *replyData,   
     LONG        *replyDataLen);
  

Parameters

NCPExtensionID
(IN) Specifies the ID of the NCP Extension to process your request (obtained by calling the NWGetNCPExtensionInfo (NLM) or NWScanNCPExtensions (NLM) function.
requestData
(IN) Points to information for the NCP Extension handler to process (optional).
requestDataLen
(IN) Specifies the length (in bytes) of the input request buffer that is being sent to the NCP Extension (optional).
replyData
(OUT) Points to the information returned by the NCP Extension (optional).
replyDataLen
(IN/OUT) Points to the length (in bytes) of the replyData parameter. Outputs a pointer to the actual number of bytes placed into the buffer (optional).

Return Values

The following table lists return values and descriptions.

Value

Hex

Name and description

0

0x00

SUCCESSFUL The extension was found, and the non-null output parameters were filled.

126

0x7E

ERR_NCPEXT_TRANSPORT_PROTOCOL_VIOLATION The message transport mechanism entered a bad state in the protocol.

150

0x96

ERR_NO_ALLOC_SPACE There was not enough memory available on the server to allocate space for the message.

252

0xFC

ERR_NCPEXT_SERVICE_PROTOCOL_VIOLATION The service provider tried to return more data than the reply buffer could hold.

254

0xFE

ERR_NCPEXT_NO_HANDLER The NCP exception handler could not be found.

1-16

 

A communications error has occurred. (See niterror.h.)

Remarks

NWSendNCPExtensionRequest sends the number of bytes specified by the requestDataLen parameter to the server.

If the requestData or requestDataLen parameter is set to NULL or zero respectively, no request data is sent.

NWSendNCPExtensionFraggedRequest copies the number of bytes from the server (indicated in the totalMessageSize field of the NCPExtensionMessageFrag structure), places them into memory locations (specified in the fragList field of the NCPExtensionMessageFrag structure), and sets a value to reflect the actual number of bytes transferred (indicated by the totalMessageSize field of the NCPExtensionMessageFrag structure).

NWSendNCPExtensionRequest copies the number of bytes from the server (specified in the replyDataLen parameter), places them into memory (specified in the replyData parameter), and sets a value to reflect the actual number of bytes transferred (specified by the replyDataLen parameter.

If the replyData or replyDataLen parameter is set to NULL or zero respectively, no reply data is returned.

NOTE:The information in the replyData parameter is valid only if NWSendNCPExtensionRequest returns SUCCESSFUL.

The request and reply buffers of the client must be reproduced on the server, so the maximum size of the buffers depends upon the memory available on the server that registers the NCP Extension. When NWSendNCPExtension is called, it attempts to allocate server memory for two message buffers. If it cannot allocate enough space, ERR_NO_ALLOC_SPACE will be returned. However, the request should be retried several times since server memory use is dynamic.

See Also

NWDeRegisterNCPExtension, NWGetNCPExtensionInfo (NLM), NWScanNCPExtensions (NLM), NWSendNCPExtensionFraggedRequest, NWRegisterNCPExtension