1. A computer-implemented method comprising: receiving registrations of first callback functions or methods in a first Application Programming Interface (API) provided for a host application to expose a host application object model to a program embedded in a virtual machine embedded in the host application; receiving registrations of second callback functions or methods in a second API provided for the virtual machine to expose a virtual machine object model, which is associated with the embedded program, to the host application; and wherein the first callback functions or methods are used to allow the embedded program to set and get properties of one or more first class instances residing in a host application memory space and to invoke methods on the one or more first class instances, the second callback functions or methods are used to allow the host application to set and get properties of one or more second class instances residing in a virtual machine memory space and to invoke methods on the one or more second class instances, and the first and second APIs do not alter a format of data retrieved from the host application and virtual machine memory spaces using the first and second callback functions or methods.