VirtualBox-5.0.0/src/VBox/Main/src-client/DisplayImpl.cpp
/**
 * Register the SSM methods. Called by the power up thread to be able to
 * pass pVM
 */
Register the SSM methods. Called by the power up thread to be able to
pass pVM
Register the SSM methods . Called by the power up thread to be able to pass pVM
int Display::i_registerSSM(PUVM pUVM)
{
    int rc = SSMR3RegisterExternal(pUVM, "DisplayData", 0, sSSMDisplayVer5,
                                   mcMonitors * sizeof(uint32_t) * 8 + sizeof(uint32_t),
                                   NULL, NULL, NULL,
                                   NULL, i_displaySSMSave, NULL,
                                   NULL, i_displaySSMLoad, NULL, this);
    AssertRCReturn(rc, rc);
    rc = SSMR3RegisterExternal(pUVM, "DisplayData", 12 , sSSMDisplayVer, 0 ,
                               NULL, NULL, NULL,
                               NULL, NULL, NULL,
                               NULL, i_displaySSMLoad, NULL, this);
    AssertRCReturn(rc, rc);
    rc = SSMR3RegisterExternal(pUVM, "DisplayData", 24 , sSSMDisplayVer, 0 ,
                               NULL, NULL, NULL,
                               NULL, NULL, NULL,
                               NULL, i_displaySSMLoad, NULL, this);
    AssertRCReturn(rc, rc);
    rc = SSMR3RegisterExternal(pUVM, "DisplayScreenshot", 1100 , sSSMDisplayScreenshotVer, 0 ,
                               NULL, NULL, NULL,
                               NULL, i_displaySSMSaveScreenshot, NULL,
                               NULL, i_displaySSMLoadScreenshot, NULL, this);
    AssertRCReturn(rc, rc);
    return VINF_SUCCESS;
}
int Display :: i_registerSSM ( PUVM pUVM ) { int rc = SSMR3RegisterExternal ( pUVM , " " , 0 , sSSMDisplayVer5 , mcMonitors * sizeof ( uint32_t ) * 8 + sizeof ( uint32_t ) , NULL , NULL , NULL , NULL , i_displaySSMSave , NULL , NULL , i_displaySSMLoad , NULL , this ) ; AssertRCReturn ( rc , rc ) ; rc = SSMR3RegisterExternal ( pUVM , " " , 12 , sSSMDisplayVer , 0 , NULL , NULL , NULL , NULL , NULL , NULL , NULL , i_displaySSMLoad , NULL , this ) ; AssertRCReturn ( rc , rc ) ; rc = SSMR3RegisterExternal ( pUVM , " " , 24 , sSSMDisplayVer , 0 , NULL , NULL , NULL , NULL , NULL , NULL , NULL , i_displaySSMLoad , NULL , this ) ; AssertRCReturn ( rc , rc ) ; rc = SSMR3RegisterExternal ( pUVM , " " , 1100 , sSSMDisplayScreenshotVer , 0 , NULL , NULL , NULL , NULL , i_displaySSMSaveScreenshot , NULL , NULL , i_displaySSMLoadScreenshot , NULL , this ) ; AssertRCReturn ( rc , rc ) ; return VINF_SUCCESS ; }
Register the SSM methods.
Register the SSM methods .
/* Version 2 adds width and height of the framebuffer; version 3 adds
     * the framebuffer offset in the virtual desktop and the framebuffer flags;
     * version 4 adds guest to host input event mapping and version 5 adds
     * guest VBVA and host cursor capabilities.
     */ /*
     * Register loaders for old saved states where iInstance was
     * 3 * sizeof(uint32_t *) due to a code mistake.
     */ /*uInstance*/ /*cbGuess*/ /*uInstance*/ /*cbGuess*/ /* uInstance is an arbitrary value greater than 1024. Such a value will ensure a quick seek in saved state file. */ /*uInstance*/ /*cbGuess*/