Ejemplo n.º 1
0
STDMETHODIMP ExtPackBaseWrap::COMGETTER(License)(BSTR *aLicense)
{
    LogRelFlow(("{%p} %s: enter aLicense=%p\n", this, "ExtPackBase::getLicense", aLicense));

    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aLicense);

        AutoCaller autoCaller(this);
        if (FAILED(autoCaller.rc()))
            throw autoCaller.rc();

        hrc = getLicense(BSTROutConverter(aLicense).str());
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
    }

    LogRelFlow(("{%p} %s: leave *aLicense=%ls hrc=%Rhrc\n", this, "ExtPackBase::getLicense", *aLicense, hrc));
    return hrc;
}
Ejemplo n.º 2
0
int main(){
	Vehicle.veh;
	Car.taxi1;
	string lic, sty;
	int ye;
	cout<<"Introdusca la Licencia del Vehiculo"<<endl ;
	cin>>lic;
	cout<<"Introdusca el Año del Vehiculo"<<endl ;
	cin>>ye;
	cout<<"Introdusca el Estilo del Vehiculo"<<endl ;
	cin>>sty;
	Car.license=lic;
	Car.year=ye;
	Car.style=sty;
	cout<<&getLicense()<<endl;
	cout<<&getYear()<<endl;
	cout<<&getStyle()<<endl;
}