本文整理汇总了C++中ComObjPtr::fileQueryInfoInternal方法的典型用法代码示例。如果您正苦于以下问题:C++ ComObjPtr::fileQueryInfoInternal方法的具体用法?C++ ComObjPtr::fileQueryInfoInternal怎么用?C++ ComObjPtr::fileQueryInfoInternal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ComObjPtr
的用法示例。
在下文中一共展示了ComObjPtr::fileQueryInfoInternal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Run
//.........这里部分代码省略.........
** @todo Only for Windows!
*/
if (RT_SUCCESS(rc))
{
rc = copyFileToGuest(pSession, &iso, "CERT/ORACLE_VBOX.CER", "%TEMP%\\oracle-vbox.cer",
true /* File is optional */, NULL /* cbSize */);
if (RT_SUCCESS(rc))
{
rc = setProgress(30);
if (RT_SUCCESS(rc))
{
rc = copyFileToGuest(pSession, &iso, "CERT/VBOXCERTUTIL.EXE", "%TEMP%\\VBoxCertUtil.exe",
true /* File is optional */, NULL /* cbSize */);
if (RT_SUCCESS(rc))
{
fInstallCertificates = true;
rc = setProgress(40);
}
else
hr = setProgressErrorMsg(VBOX_E_IPRT_ERROR,
Utf8StrFmt(GuestSession::tr("Error while copying certificate installation tool to the guest: %Rrc"), rc));
}
}
else
hr = setProgressErrorMsg(VBOX_E_IPRT_ERROR,
Utf8StrFmt(GuestSession::tr("Error while copying certificate to the guest: %Rrc"), rc));
}
}
/*
* Run VBoxCertUtil.exe to install the Oracle certificate.
*/
if ( RT_SUCCESS(rc)
&& fInstallCertificates)
{
LogRel(("Installing certificates on the guest ...\n"));
GuestProcessStartupInfo procInfo;
procInfo.mName = Utf8StrFmt(GuestSession::tr("VirtualBox Guest Additions Certificate Utility"));
procInfo.mCommand = Utf8Str("%TEMP%\\VBoxCertUtil.exe");
procInfo.mFlags = ProcessCreateFlag_Hidden;
/* Construct arguments. */
/** @todo Remove hardcoded paths. */
procInfo.mArguments.push_back(Utf8Str("add-trusted-publisher"));
/* Ugly hack: Because older Guest Additions have problems with environment variable
expansion in parameters we have to check an alternative location on Windows.
So check for "%TEMP%\VBoxWindowsAdditions.exe" in a screwed up way. */
#ifdef VBOX_SERVICE_ENVARG_BUG
GuestFsObjData objData;
rc = pSession->fileQueryInfoInternal("%TEMP%\\oracle-vbox.cer", objData);
if (RT_SUCCESS(rc))
#endif
procInfo.mArguments.push_back(Utf8Str("%TEMP%\\oracle-vbox.cer"));
#ifdef VBOX_SERVICE_ENVARG_BUG
else
procInfo.mArguments.push_back(Utf8Str("C:\\Windows\\system32\\EMPoracle-vbox.cer"));
#endif
/* Overwrite rc in any case. */
rc = runFile(pSession, procInfo);
}
if (RT_SUCCESS(rc))
rc = setProgress(60);
if (RT_SUCCESS(rc))
{
LogRel(("Updating Guest Additions ...\n"));
GuestProcessStartupInfo procInfo;
procInfo.mName = Utf8StrFmt(GuestSession::tr("VirtualBox Guest Additions Setup"));
procInfo.mCommand = Utf8Str(strInstallerDest);
procInfo.mFlags = ProcessCreateFlag_Hidden;
/* If the caller does not want to wait for out guest update process to end,
* complete the progress object now so that the caller can do other work. */
if (mFlags & AdditionsUpdateFlag_WaitForUpdateStartOnly)
procInfo.mFlags |= ProcessCreateFlag_WaitForProcessStartOnly;
/* Construct arguments. */
procInfo.mArguments.push_back(Utf8Str("/S")); /* We want to install in silent mode. */
procInfo.mArguments.push_back(Utf8Str("/l")); /* ... and logging enabled. */
/* Don't quit VBoxService during upgrade because it still is used for this
* piece of code we're in right now (that is, here!) ... */
procInfo.mArguments.push_back(Utf8Str("/no_vboxservice_exit"));
/* Tell the installer to report its current installation status
* using a running VBoxTray instance via balloon messages in the
* Windows taskbar. */
procInfo.mArguments.push_back(Utf8Str("/post_installstatus"));
rc = runFile(pSession, procInfo);
if (RT_SUCCESS(rc))
hr = setProgressSuccess();
}
RTIsoFsClose(&iso);
}
}
LogFlowFuncLeaveRC(rc);
return rc;
}