本文整理汇总了C#中Kirikiri.Tjs2.Variant.Clear方法的典型用法代码示例。如果您正苦于以下问题:C# Variant.Clear方法的具体用法?C# Variant.Clear怎么用?C# Variant.Clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kirikiri.Tjs2.Variant
的用法示例。
在下文中一共展示了Variant.Clear方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FuncCall
/// <exception cref="Kirikiri.Tjs2.VariantException"></exception>
/// <exception cref="Kirikiri.Tjs2.TJSException"></exception>
public override int FuncCall(int flag, string membername, Variant result, Variant
[] param, Dispatch2 objthis)
{
if (membername != null)
{
return base.FuncCall(flag, membername, result, param, objthis);
}
if (result != null)
{
result.Clear();
}
return Process(result, param, objthis);
}
示例2: PropGet
/// <exception cref="Kirikiri.Tjs2.VariantException"></exception>
/// <exception cref="Kirikiri.Tjs2.TJSException"></exception>
public override int PropGet(int flag, string membername, Variant result, Dispatch2
objthis)
{
int hr = base.PropGet(flag, membername, result, objthis);
if (hr == Error.E_MEMBERNOTFOUND && (flag & Interface.MEMBERMUSTEXIST) == 0)
{
if (result != null)
{
result.Clear();
}
// returns void
return Error.S_OK;
}
return hr;
}
示例3: EnumCallback
/// <exception cref="Kirikiri.Tjs2.TJSException"></exception>
private static bool EnumCallback(int flags, EnumMembersCallback callback, Variant
value, Dispatch2 objthis, SymbolData data)
{
int newflags = 0;
if ((data.mSymFlags & SYMBOL_HIDDEN) != 0)
{
newflags |= Interface.HIDDENMEMBER;
}
if ((data.mSymFlags & SYMBOL_STATIC) != 0)
{
newflags |= Interface.STATICMEMBER;
}
value.Clear();
if ((flags & Interface.ENUM_NO_VALUE) == 0)
{
bool getvalues = false;
if ((flags & Interface.IGNOREPROP) == 0)
{
Variant targ = data.mValue;
if (targ.IsObject())
{
VariantClosure tvclosure = targ.AsObjectClosure();
int hr = Error.E_NOTIMPL;
if (tvclosure.mObject != null)
{
Dispatch2 disp = tvclosure.mObjThis != null ? tvclosure.mObjThis : objthis;
hr = tvclosure.mObject.PropGet(0, null, value, disp);
}
if (hr >= 0)
{
getvalues = true;
}
else
{
if (hr != Error.E_NOTIMPL && hr != Error.E_INVALIDTYPE && hr != Error.E_INVALIDOBJECT)
{
return false;
}
}
}
}
if (getvalues == false)
{
value.CopyRef(data.mValue);
}
}
return callback.Callback(data.mName, newflags, value);
}
示例4: Release
public void Release(Variant va)
{
if (va == null)
{
return;
}
va.Clear();
int poolSize = mPool.Count;
if (poolSize < LIMIT_SIZE)
{
mPool.AddItem(va);
}
}