Again to quote MSDN:
lpBuffer [in] A pointer to the buffer containing the data to be written to the file or device. This buffer must remain valid for the duration of the write operation. The caller must not use this buffer until the write operation is completed.
So it seems your messages are not guaranteed to arrive safely if you mess with the buffer while the write operation is taking place. You should definitely not destroy the buffer