<div>Hello,</div><div><br></div><div>I'm new here, and I'm having trouble finding the documentation regarding the way object-oriented classes and interfaces are handled in virtualbox. I'm interested in the Storage subsystem, and I understand the code itself and the syscalls well enough, but I don't have a clue how the interfaces are defined.</div>
<div><br></div><div>The code I'm having difficulty with is code like :</div><div><br></div><div>/** Makes a PDRVHOSTBASE out of a PPDMIMOUNT. */</div><div>#define PDMIMOUNT_2_DRVHOSTBASE(pInterface)        ( (PDRVHOSTBASE)((uintptr_t)pInterface - RT_OFFSETOF(DRVHOSTBASE, IMount)) )</div>
<div><br></div><div>/** Makes a PDRVHOSTBASE out of a PPDMIBLOCK. */</div><div>#define PDMIBLOCK_2_DRVHOSTBASE(pInterface)        ( (PDRVHOSTBASE)((uintptr_t)pInterface - RT_OFFSETOF(DRVHOSTBASE, IBlock)) )</div><div><br>
</div><div>How are the objects defined ? How are the conversions handled ?</div><div><br></div><div>Cheers,</div><div><br></div><div>Wapper</div>