LlmCancelRequest Function  
 
BOOL WINAPI LlmCancelRequest(
  HCLIENT hClient  
);

The LlmCancelRequest function cancels the current blocking request.

Parameters

hClient
A handle to the client session.

Return Value

If the function succeeds, the return value is non-zero. If the function fails, the return value is zero. To get extended error information, call LlmGetLastError.

Remarks

The LlmCancelRequest function cancels the current blocking request by closing the active HTTP connection associated with the client session. This causes the blocking function to fail and return control to the calling thread. The last error code for the blocking function will be set to indicate the operation was canceled.

This function cancels the request locally. It does not guarantee that the provider will stop processing a request that has already been received. The provider may still complete the request and may charge for any processing or tokens used before the connection was closed.

Canceling a request does not delete the client session or clear the conversation history. The client handle remains valid, and a new HTTP connection will be established automatically if it is needed for a subsequent request.

If no blocking request is currently in progress, this function succeeds and has no effect.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csllmv12.lib

See Also

LlmIsBlocking, LlmSendMessage, LlmSendMessageEx