I was wondering if there was a way to set up a queue in c# to receive custom structs. For example, I want to receive and store messages of the following structure into a queue:
public struct TPCANMsg
{
/// <summary>
/// 11/29-bit message identifier
/// </summary>
public uint ID;
/// <summary>
/// Type of the message
/// </summary>
[MarshalAs(UnmanagedType.U1)]
public TPCANMessageType MSGTYPE;
/// <summary>
/// Data Length Code of the message (0..8)
/// </summary>
public byte LEN;
/// <summary>
/// Data of the message (DATA[0]..DATA[7])
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
public byte[] DATA;
}
How would I go about setting up a MSMQ to receive and process that data type?
Thanks very much