[vbox-dev] How does the virtualbox object-orientation work ? Any documentation ?

Christophe Devriese christophe.devriese at gmail.com
Thu Jan 28 10:23:08 GMT 2010


Hello,

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.

The code I'm having difficulty with is code like :

/** Makes a PDRVHOSTBASE out of a PPDMIMOUNT. */
#define PDMIMOUNT_2_DRVHOSTBASE(pInterface)        (
(PDRVHOSTBASE)((uintptr_t)pInterface - RT_OFFSETOF(DRVHOSTBASE, IMount)) )

/** Makes a PDRVHOSTBASE out of a PPDMIBLOCK. */
#define PDMIBLOCK_2_DRVHOSTBASE(pInterface)        (
(PDRVHOSTBASE)((uintptr_t)pInterface - RT_OFFSETOF(DRVHOSTBASE, IBlock)) )

How are the objects defined ? How are the conversions handled ?

Cheers,

Wapper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100128/fd9c7884/attachment.html>


More information about the vbox-dev mailing list