nsIPluginInstance* pluginInstance = (nsIPluginInstance* )instance->pdata;
CPluginInstancePeer* peer = (CPluginInstancePeer*) instance->pdata; if ( peer == NULL) return NPERR_INVALID_PLUGIN_ERROR;   peer->SetWindow(window);  nsIPluginInstance* pluginInstance = peer->GetInstance();
NPP_SetWindow(NPP instance, NPWindow* window){//    TRACE("NPP_SetWindow\n");        if (instance == NULL)        return NPERR_INVALID_INSTANCE_ERROR;    nsIPluginInstance* pluginInstance = (nsIPluginInstance* )instance->pdata;        if( pluginInstance == 0 )        return NPERR_INVALID_PLUGIN_ERROR;    return (NPError)pluginInstance->SetWindow((nsPluginWindow* ) window );}