AttachPropertyInstance

The AttachPropertyInstance function attaches a property instance to a frame, thus creating a PROPERTYINST structure for that frame in the PROPERTYINSTTABLE for the frame.

DWORD AttachPropertyInstance(
  HFRAME hFrame,        
  HPROPERTY hProperty,  
  DWORD Length,         
  LPVOID lpData,        
  DWORD HelpID,         
  DWORD IndentLevel,    
  DWORD IFlags          
);
 

Parameters

hFrame
Specifies the handle to the frame to which to add the property instance.
hProperty
Specifies the handle for the property to add.
Length
Specifies the length of the data.
lpData
Specifies a pointer to the data in the frame where the Properties value is located.
HelpID
Specifies a number (from 0 to 2047) signifying a Help identifier used to set context-sensitive Help on the property. The number is relative to the Help file identified with the property database identified in the CreatePropertyDatabase call.
IndentLevel
Specifies a number (from 0 to 15) signifying an indentation level for hierachical displays. Properties of type PROP_TYPE_SUMMARY should always be level 0. All other properties are at the parser writer's prerogative, but starting at 1 will provide the most consistent display. The current user interface uses levels 0–9. Level 15 is a special level that allows the parser to attach a hidden property that will not normally be displayed.
IFlags
Specifies a bitfield that has the following definitions:
1 IFLAG_ERROR
2 IFLAG_SWAPPED (WORD or DWORD byte is non-Intel format at attach time)
4 IFLAG_UNICODE (STRING is UNICODE at attach time)

Note that earlier parsers set the fError DWORD to 0 or 1, which will map to IFLAG_ERROR.

Return Values

The return value is the error code.

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 is used to attach a property instance to a frame, thus creating a PROPERTYINST structure for that frame in the PROPERTYINSTTABLE for the frame. This function will add the information to the frame as a PROPERTYINST structure.