You have to use class AcDbDynBlockReference. Construct an AcDbDynBlockReference with the objectid of your BREF or with the BREF pointer itself. Then you can query the dynamic property and set them like this:
#include <dbdynblk.h>
Acad::ErrorStatus es;
AcDbDynBlockReference dynBref(brefID);
AcDbDynBlockReferencePropertyArray properties;
dynBref.getBlockProperties(properties);
int i, count = properties.length();
for (i = 0; i < count; ++i)
{
AcDbDynBlockReferenceProperty &property = properties[i];
bool bReadOnly = property.readOnly();
AcString strName = property.propertyName();
AcString strDescr = property.description();
AcDbEvalVariant value(_your_value_); // _your_value_ can be double, short, const ACHAR* ...
es = property.setValue(value);
}
Keep in mind that AutoCAD will create a different AcDbBlockTableRecord and your BREF will point to this new BTR after you changed parameters.
Thomas Brammer ● Software Developer ● imos AG ● LinkedIn ● 
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.