User`s guide
Contents cxxv
Free Communications Buffer—Function 124
This function allows the application to release exclusive control of a buffer that is no longer required by
the application.
Prerequisite Functions
Allocate Communications Buffer (123).
WinHLLAPI(FREECOMMBUFF,lpbyString,lpwLength,lpwReturnnCode)
Parameter Description
Data String A 6-byte string with the following format:
Byte 1-2 16-bit length of the buffer to be freed. If the
value of the length specified is 0, the entire
buffer is freed.
Byte 3-6 32-bit address of the buffer obtained from
call to Allocate Communications Buffer
(123).
Data Length Must be specified.
PS Position NA
Code Description
WHLLOK The function was successful.
WHLLNOTCONNECTED An invalid presentation space was specified, or was not
connected.
WHLLPARAMETERERROR An invalid option was specified.
WHLLSYSERROR The function failed due to a system error.
WHLLBUFFINUSE The specified buffer is currently in use.
If the application attempts to free a buffer in which the buffer address plus the buffer length overlaps a
buffer currently in use, the request is denied and the return code value of 41 (requested buffer in use) is
returned. If the application attempts to free an entire selector that contains a buffer in use, the request
is also denied and the return code value 41 is returned to the application.
Before exiting an application, you should issue the Free Communications Buffer function call for all
communications buffers that have been allocated using the Allocate Communications Buffer (123)
function. If the application exits without freeing the buffers, WinHLLAPI will free them when the
application exits.
Buffers can also be freed by the Reset System (21) function.
Function Call
Call Parameters
Return Code
Remarks