I'm trying to create a new Dictionary and inject it in the IORegistry. I've managed to inject simple strings or data values but thats it.
My approach is via a modified IOPCIFamily.kext, and it's not for a specific purpose but just for learning.
My code for 1 line values is something like this
if (product == id){ setProperty("test", "test") }
and another approach
if (product == id){ propTable->setObject("TEST", prop) prop->release(); }
propTable is the Parent Dictionary, so i must create a child Dictionary to which i can inject values with setObject parameter.
Does anyone have an idea on how to do this? I suspect it must be something like this:
propTable->newTable->setObject(etc)
but i didn't figure how to create the newTable for propTable to insert it in the existing one of what ever product == ids it finds.
Thank you very much, sorry if it's confusing. Not used to explain code related stuff in english.