I have set up my queue to pass message packets around the system. The maximum message size is 1024, but most messages will be much smaller. The first two bytes in the packet contain the message length. I would like to be able to add a parameter to the Queue send, PacketLength. When calling QueueSend with NULL in this position, it would behave as it does now, else it would move PacketLength bytes of date into the that queue location, leaving the last (1024 minus PacketLength) uninitialized. I would then have modified QueueRecieve, lets say QueueRecieveModified, that when called would use the first two byte in the queue being read to tell it how many bytes to move out or the queue into the destination address.
Or does something llike this exist - I am new to all of this.