CreateHeader

Creates a message object of the specified type. This object can have its properties set to the required values prior to it being sent out to a device via the SendMessage method.

Function

Header CreateHeader();

Parameters

None

Return Value

A header object that is initialized to all zero values.

Example

var myHeader = CreateHeader(); // Create header structure
var myBody = CreateMessage("TraceRequest"); // Create message structure
myHeader.MessageID = 75;
myHeader.DeviceID = 5;
myHeader.LocationID = 2;
myHeader.DeviceRef = 0;

myBody.Barcode = "123456789000"; // Fill the members of the structure
myBody.ActionID = 1;
myBody.OperatorID = 0;
myBody.reserved = 0;
SendMessage(myBody,myHeader); // Send message

myBody.Dispose(); // Release body memory
myHeader.Dispose(); // Release header memory