Exemple #1
0
bool rwx_unrefobject(VALUE object)
{
	if(ref_counter[object] != 0)
		ref_counter[object]--;
	if(ref_counter[object] == 0) {
		rb_hash_delete(global_holder,RB_INT2NUM(object));
		return true;
	}
	return false;
}
Exemple #2
0
static VALUE
ole_method_dispid(ITypeInfo *pTypeInfo, UINT method_index)
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    VALUE dispid = Qnil;
    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if (FAILED(hr))
        return dispid;
    dispid = RB_INT2NUM(pFuncDesc->memid);
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return dispid;
}
Exemple #3
0
void rwx_refobject(VALUE object)
{
	if(ref_counter[object] == 0)
		rb_hash_aset(global_holder,RB_INT2NUM(object),object);
	ref_counter[object]++;
}