NWSendNCPExtensionFraggedRequest
Sends a request to the specified NCP extension and allows data to be retrieved from and stored in noncontiguous memory locations
#include <nlm\nwncpx.h>
int NWSendNCPExtensionFraggedRequest (
LONG NCPExtensionID,
const struct NCPExtensionMessageFrag
*requestFrag,
struct NCPExtensionMessageFrag
* replyFrag);
The following table lists return values and descriptions.
Call NWSendNCPExtensionFraggedRequest when you want to send your NCP Extension handler information stored at various locations which will avoid copying the information into a single buffer before sending it to your NCP Extension.
NWSendNCPExtensionFraggedRequest can also place the reply data into up to four specific locations, eliminating the need for you to copy the data from a reply buffer.
If your NCP Extension uses a single input buffer and/or a single output buffer, call NWSendNCPExtensionRequest instead of NWSendNCPExtensionFraggedRequest.
If your NLM registers its NCP Extension by a specific ID, use that ID when calling NWSendNCPExtensionFraggedRequest. If your NLM registers its NCP Extension by name, call NWGetNCPExtensionInfo (NLM) or NWScanNCPExtensions (NLM) to obtain the ID before calling NWSendNCPExtensionFraggedRequest.
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).
NOTE:The information in the replyFrag parameter is valid only if NWSendNCPExtensionFraggedRequest 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 NWSendNCPExtensionFraggedRequest 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.