本文整理汇总了C++中xbox::VJSParms_callStaticFunction::ReturnBool方法的典型用法代码示例。如果您正苦于以下问题:C++ VJSParms_callStaticFunction::ReturnBool方法的具体用法?C++ VJSParms_callStaticFunction::ReturnBool怎么用?C++ VJSParms_callStaticFunction::ReturnBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xbox::VJSParms_callStaticFunction
的用法示例。
在下文中一共展示了VJSParms_callStaticFunction::ReturnBool方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _save
void VJSImage::_save(XBOX::VJSParms_callStaticFunction& ioParms, VJSPictureContainer* inPict)
{
VPictureCodecFactoryRef fact;
const VPictureCodec* encoder = nil;
bool ok = false;
VPicture* pic = inPict->GetPict();
if (pic != nil)
{
VFile* file = ioParms.RetainFileParam(1);
if (file != nil)
{
VString mimetype;
ioParms.GetStringParam(2, mimetype);
if (mimetype.IsEmpty())
{
VString extension;
file->GetExtension(extension);
if (extension.IsEmpty())
extension = L"pic";
encoder = fact->RetainEncoderForExtension(extension);
}
else
encoder = fact->RetainEncoderByIdentifier(mimetype);
if (encoder != nil)
{
VError err = VE_OK;
if (file->Exists())
err = file->Delete();
if (err == VE_OK)
{
VValueBag *pictureSettings = nil;
VValueBag *bagMetas = (VValueBag*)inPict->RetainMetaBag();
if (bagMetas != nil)
{
pictureSettings = new VValueBag();
ImageEncoding::stWriter settingsWriter(pictureSettings);
VValueBag *bagRetained = settingsWriter.CreateOrRetainMetadatas( bagMetas);
if (bagRetained)
bagRetained->Release();
}
err=encoder->Encode(*pic, pictureSettings, *file);
QuickReleaseRefCountable(bagMetas);
QuickReleaseRefCountable(pictureSettings);
if (err == VE_OK)
ok = true;
}
encoder->Release();
}
file->Release();
}
else
vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_FILE, "1");
}
ioParms.ReturnBool(ok);
}
示例2: _IsRunning
void VJSSharedWorkerClass::_IsRunning (XBOX::VJSParms_callStaticFunction &ioParms, void *)
{
XBOX::VString url, name;
if (!ioParms.GetStringParam(1, url))
XBOX::vThrowError(XBOX::VE_JVSC_WRONG_PARAMETER_TYPE_STRING, "1");
else if (!ioParms.GetStringParam(2, name))
XBOX::vThrowError(XBOX::VE_JVSC_WRONG_PARAMETER_TYPE_STRING, "2");
else
ioParms.ReturnBool(VJSWorker::IsSharedWorkerRunning(url, name));
}