# CmtReleaseTSQWritePtr

int CmtReleaseTSQWritePtr (int queueHandle, int itemsWritten);

## Purpose

Releases a pointer to a thread safe queue's internal buffer that you obtained from CmtGetTSQWritePtr.

The data you write to the thread safe queue is not available for reading from another thread until you release the pointer with this function. After you call this function, the pointer is no longer valid. You cannot use an invalid pointer to write data into the thread safe queue.

## Parameters

Input
Name | Type | Description
queueHandle | integer | The handle you obtained from CmtNewTSQ to identify the thread safe queue.
itemsWritten | integer | The number of items that you wrote into the thread safe queue using the write pointer you obtained from CmtGetTSQWritePtr.

## Return Value

Name | Type | Description
CmtStatus | integer | The CmtStatus code that the function call returns. This function returns 0 to indicate success and negative values to indicate failure. Pass the CmtStatus code to CmtGetErrorMessage to get a description of the error code.