AddProperty

The AddProperty function adds a PropertyInfo structure to the PropertyDatabase.

HPROPERTY AddProperty(
  HPROTOCOL hProtocol,         
  LPPROPERTYINFO PropertyInfo  
);
 

Parameters

hProtocol
The handle of the protocol to add the property to.
PropertyInfo
A pointer to the structure describing the property.

Return Values

Returns a pointer to the property added. If not NULL, then the protocol offset is valid. If NULL, then BHGetLastError is valid.

Error Code Meaning
BHERR_SUCCESS No problems were encountered.
BHERR_INVALID_HPROPERTY The hProperty was invalid.
BHERR_INVALID_HFRAME The hFrame was invalid.

Remarks

This function,which adds a PropertyInfo structure to the PropertyDatabase, is how the parser describes the database format and properties to the kernel. The properties are added one property at a time. See Sample Parser for an example.