这篇教程C++ CallFunction函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CallFunction函数的典型用法代码示例。如果您正苦于以下问题:C++ CallFunction函数的具体用法?C++ CallFunction怎么用?C++ CallFunction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CallFunction函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: pkcs11_C_GetSlotListstatic VALUEpkcs11_C_GetSlotList(VALUE self, VALUE presented){ CK_ULONG ulSlotCount; CK_SLOT_ID_PTR pSlotList; CK_RV rv; CK_C_GetSlotList func; CK_ULONG i; VALUE ary = rb_ary_new(); GetFunction(self, C_GetSlotList, func); CallFunction(C_GetSlotList, func, rv, CK_FALSE, NULL_PTR, &ulSlotCount); if (rv != CKR_OK) pkcs11_raise(self,rv); pSlotList = (CK_SLOT_ID_PTR)malloc(ulSlotCount*sizeof(CK_SLOT_ID)); CallFunction(C_GetSlotList, func, rv, RTEST(presented) ? CK_TRUE : CK_FALSE, pSlotList, &ulSlotCount); if (rv != CKR_OK) { free(pSlotList); pkcs11_raise(self,rv); } for (i = 0; i < ulSlotCount; i++) rb_ary_push(ary, HANDLE2NUM(pSlotList[i])); free(pSlotList); return ary;}
开发者ID:cprice404,项目名称:pkcs11,代码行数:25,
示例2: pkcs11_C_GetMechanismListstatic VALUEpkcs11_C_GetMechanismList(VALUE self, VALUE slot_id){ CK_RV rv; CK_C_GetMechanismList func; CK_MECHANISM_TYPE_PTR types; CK_ULONG count; VALUE ary; CK_ULONG i; ary = rb_ary_new(); GetFunction(self, C_GetMechanismList, func); CallFunction(C_GetMechanismList, func, rv, NUM2HANDLE(slot_id), NULL_PTR, &count); if (rv != CKR_OK) pkcs11_raise(self,rv); if (count == 0) return ary; types = (CK_MECHANISM_TYPE_PTR)malloc(sizeof(CK_MECHANISM_TYPE)*count); if (!types) rb_sys_fail(0); CallFunction(C_GetMechanismList, func, rv, NUM2HANDLE(slot_id), types, &count); if (rv != CKR_OK){ free(types); pkcs11_raise(self,rv); } for (i = 0; i < count; i++) rb_ary_push(ary, HANDLE2NUM(*(types+i))); free(types); return ary;}
开发者ID:cprice404,项目名称:pkcs11,代码行数:29,
示例3: distRight double Cell_t::GetWidth(const XlfOper& ref) { // there is no get width function so we work it // out using the distances from far left double distRight(CallFunction(xlfGetCell, 44, ref, "Get Right Position").AsDouble()); double distLeft(CallFunction(xlfGetCell, 42, ref, "Get Left Position").AsDouble()); return distRight - distLeft; }
开发者ID:quant911,项目名称:xlw518,代码行数:8,
示例4: CallFunction XlfOper Notes_t::GetNote(const XlfOper& cellRef, int startCharacter, int numChars) { if(numChars == 0) { return CallFunction(xlfGetNote, cellRef, startCharacter + 1, "Get Note"); } else { return CallFunction(xlfGetNote, cellRef, startCharacter + 1, numChars, "Get Note"); } }
开发者ID:quant911,项目名称:xlw518,代码行数:11,
示例5: Lockbool cPlugin_NewLua::OnExecuteCommand(cPlayer * a_Player, const AStringVector & a_Split){ cCSLock Lock(m_CriticalSection); const char * FnName = GetHookFnName(cPluginManager::HOOK_EXECUTE_COMMAND); ASSERT(FnName != NULL); if (!PushFunction(FnName)) { return false; } tolua_pushusertype(m_LuaState, a_Player, "cPlayer"); // Push the split: lua_createtable(m_LuaState, a_Split.size(), 0); int newTable = lua_gettop(m_LuaState); int index = 1; std::vector<std::string>::const_iterator iter = a_Split.begin(), end = a_Split.end(); while(iter != end) { tolua_pushstring(m_LuaState, (*iter).c_str()); lua_rawseti(m_LuaState, newTable, index); ++iter; ++index; } if (!CallFunction(2, 1, FnName)) { return false; } bool bRetVal = (tolua_toboolean(m_LuaState, -1, 0) > 0); lua_pop(m_LuaState, 1); return bRetVal;}
开发者ID:l0ud,项目名称:MCServer,代码行数:34,
示例6: pkcs11_C_GetFunctionList/* * Obtains a pointer to the Cryptoki library's list of function pointers. The pointer * is stored in the {PKCS11::Library} object and used to call any Cryptoki functions. * * @see PKCS11::Library#initialize */static VALUEpkcs11_C_GetFunctionList(VALUE self){ pkcs11_ctx *ctx; CK_RV rv; CK_C_GetFunctionList func; Data_Get_Struct(self, pkcs11_ctx, ctx);#ifdef compile_for_windows func = (CK_C_GetFunctionList)GetProcAddress(ctx->module, "C_GetFunctionList"); if(!func){ char error_text[999] = "GetProcAddress() error"; FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_MAX_WIDTH_MASK, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&error_text, sizeof(error_text), NULL); rb_raise(ePKCS11Error, "%s", error_text); }#else func = (CK_C_GetFunctionList)dlsym(ctx->module, "C_GetFunctionList"); if(!func) rb_raise(ePKCS11Error, "%s", dlerror());#endif CallFunction(C_GetFunctionList, func, rv, &(ctx->functions)); if (rv != CKR_OK) pkcs11_raise(self,rv); return self;}
开发者ID:cprice404,项目名称:pkcs11,代码行数:32,
示例7: TestConstructorDestructorvoid TestConstructorDestructor(clcpp::Database& db){ const clcpp::Class* ca = clcpp::GetType<TestClassImpl::A>()->AsClass(); const clcpp::Class* cb = clcpp::GetType<TestClassImpl::B>()->AsClass(); TestClassImpl::A* a = (TestClassImpl::A*)new char[sizeof(TestClassImpl::A)]; TestClassImpl::B* b = (TestClassImpl::B*)new char[sizeof(TestClassImpl::B)]; CallFunction(ca->constructor, a); CallFunction(cb->constructor, b); CallFunction(ca->destructor, a); CallFunction(cb->destructor, b); delete [] (char*) a; delete [] (char*) b;}
开发者ID:Celtoys,项目名称:clReflect,代码行数:17,
示例8: CallFunctionunsigned int YouTubeWebPageView::GetVideoBytesTotal(){ CComVariant varResult; CallFunction(_T("getVideoBytesTotal"), std::vector<CComVariant>(), varResult); ATLASSERT(varResult.vt == VT_I4); return varResult.intVal;}
开发者ID:vividos,项目名称:PartyVideoDJ,代码行数:8,
示例9: CallFunctionclcpp::ReadIterator::~ReadIterator(){ // Destruct the read iterator if (m_IteratorImplType != 0) CallFunction(m_IteratorImplType->destructor, (IReadIterator*)m_ImplData); else clcpp::internal::CallDestructor((ArrayReadIterator*)m_ImplData);}
开发者ID:Celtoys,项目名称:clReflect,代码行数:8,
示例10: FnCallEvaluateFnCallResult FnCallEvaluate(EvalContext *ctx, FnCall *fp, const Promise *caller){ Rlist *expargs; const FnCallType *fp_type = FnCallTypeGet(fp->name); if (fp_type) { if (DEBUG) { printf("EVALUATE FN CALL %s/n", fp->name); FnCallShow(stdout, fp); printf("/n"); } } else { if (caller) { CfOut(OUTPUT_LEVEL_ERROR, "", "No such FnCall /"%s()/" in promise @ %s near line %zd/n", fp->name, PromiseGetBundle(caller)->source_path, caller->offset.line); } else { CfOut(OUTPUT_LEVEL_ERROR, "", "No such FnCall /"%s()/" - context info unavailable/n", fp->name); } return (FnCallResult) { FNCALL_FAILURE, { FnCallCopy(fp), RVAL_TYPE_FNCALL } }; }/* If the container classes seem not to be defined at this stage, then don't try to expand the function */ if ((caller != NULL) && !IsDefinedClass(ctx, caller->classes, PromiseGetNamespace(caller))) { return (FnCallResult) { FNCALL_FAILURE, { FnCallCopy(fp), RVAL_TYPE_FNCALL } }; } expargs = NewExpArgs(ctx, fp, caller); if (UnresolvedArgs(expargs)) { DeleteExpArgs(expargs); return (FnCallResult) { FNCALL_FAILURE, { FnCallCopy(fp), RVAL_TYPE_FNCALL } }; } fp->caller = caller; FnCallResult result = CallFunction(ctx, fp_type, fp, expargs); if (result.status == FNCALL_FAILURE) { /* We do not assign variables to failed function calls */ DeleteExpArgs(expargs); return (FnCallResult) { FNCALL_FAILURE, { FnCallCopy(fp), RVAL_TYPE_FNCALL } }; } DeleteExpArgs(expargs); return result;}
开发者ID:shaunamarie,项目名称:core,代码行数:58,
示例11: CallFunctioncLuaInterpreter::~cLuaInterpreter(){ char * args[] = { NULL }; if(mL) { CallFunction("UnLoad", args); lua_close(mL); } clean();}
开发者ID:asshole52,项目名称:verlihub,代码行数:9,
示例12: pkcs11_C_GetOperationStatestatic VALUEpkcs11_C_GetOperationState(VALUE self, VALUE session){ CK_RV rv; CK_C_GetOperationState func; VALUE state; CK_ULONG size; GetFunction(self, C_GetOperationState, func); CallFunction(C_GetOperationState, func, rv, NUM2HANDLE(session), NULL_PTR, &size); if (rv != CKR_OK) pkcs11_raise(self,rv); state = rb_str_new(0, size); CallFunction(C_GetOperationState, func, rv, NUM2HANDLE(session), (CK_BYTE_PTR)RSTRING_PTR(state), &size); if (rv != CKR_OK) pkcs11_raise(self,rv); rb_str_set_len(state, size); return state;}
开发者ID:cprice404,项目名称:pkcs11,代码行数:18,
示例13: EvaluateFunctionCallFnCallResult EvaluateFunctionCall(FnCall *fp, Promise *pp){ Rlist *expargs; const FnCallType *this = FindFunction(fp->name); if (this) { if (DEBUG) { printf("EVALUATE FN CALL %s/n", fp->name); ShowFnCall(stdout, fp); printf("/n"); } } else { if (pp) { CfOut(cf_error, "", "No such FnCall /"%s()/" in promise @ %s near line %zd/n", fp->name, pp->audit->filename, pp->offset.line); } else { CfOut(cf_error, "", "No such FnCall /"%s()/" - context info unavailable/n", fp->name); } return (FnCallResult) { FNCALL_FAILURE, { CopyFnCall(fp), CF_FNCALL } }; }/* If the container classes seem not to be defined at this stage, then don't try to expand the function */ if ((pp != NULL) && !IsDefinedClass(pp->classes)) { return (FnCallResult) { FNCALL_FAILURE, { CopyFnCall(fp), CF_FNCALL } }; } expargs = NewExpArgs(fp, pp); if (UnresolvedArgs(expargs)) { DeleteExpArgs(expargs); return (FnCallResult) { FNCALL_FAILURE, { CopyFnCall(fp), CF_FNCALL } }; } FnCallResult result = CallFunction(this, fp, expargs); if (result.status == FNCALL_FAILURE) { /* We do not assign variables to failed function calls */ DeleteExpArgs(expargs); return (FnCallResult) { FNCALL_FAILURE, { CopyFnCall(fp), CF_FNCALL } }; } DeleteExpArgs(expargs); return result;}
开发者ID:joegen,项目名称:sipx-externals,代码行数:56,
示例14: CallFunction// Calls a Lua function from a given keynamebool _Scripting::HandleKeyPress(int Key) { // Find function KeyCallbacksIterator = KeyCallbacks.find(Key); if(KeyCallbacksIterator != KeyCallbacks.end()) { CallFunction(KeyCallbacksIterator->second); return true; } return false;}
开发者ID:vinjn,项目名称:irrlamb,代码行数:12,
示例15: COMPONENT_TRACETInt RTFDosExtension::CallSyncDosExtFunction( const TInt& aFunc, TAny* aParam = NULL, TInt aParLength = 0, TBool aAutoComplete = ETrue ) { COMPONENT_TRACE( ( _L( " DSYTESTTOOL - RTFDosExtension::CallSyncDosExtFunction(0x%x, 0x%x, 0x%x, 0x%x)" ), aFunc, aParam, aParLength, aAutoComplete ) ); TExtensionParPckg package; package().iFunc = aFunc; package().iParLength = aParLength; package().iAutoComplete = aAutoComplete; TPtr8 ptr( ( TUint8* )aParam, aParLength, aParLength ); TInt result = CallFunction( package, ptr ); COMPONENT_TRACE( ( _L( " DSYTESTTOOL - RTFDosExtension::CallSyncDosExtFunction - return 0x%x" ), result ) ); return result; }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:12,
示例16: pkcs11_C_CloseSessionstatic VALUEpkcs11_C_CloseSession(VALUE self, VALUE session){ CK_C_CloseSession func; CK_RV rv; GetFunction(self, C_CloseSession, func); CallFunction(C_CloseSession, func, rv, NUM2HANDLE(session)); if(rv != CKR_OK) pkcs11_raise(self,rv); return self;}
开发者ID:cprice404,项目名称:pkcs11,代码行数:12,
示例17: pkcs11_C_Finalize/* * Is called to indicate that an application is finished with the Cryptoki library. * @see PKCS11::Library#close */static VALUEpkcs11_C_Finalize(VALUE self){ CK_C_Finalize func; CK_RV rv; GetFunction(self, C_Finalize, func); CallFunction(C_Finalize, func, rv, NULL_PTR); if (rv != CKR_OK) pkcs11_raise(self,rv); return self;}
开发者ID:cprice404,项目名称:pkcs11,代码行数:16,
示例18: pkcs11_C_CloseAllSessionsstatic VALUEpkcs11_C_CloseAllSessions(VALUE self, VALUE slot_id){ CK_C_CloseAllSessions func; CK_RV rv; GetFunction(self, C_CloseAllSessions, func); CallFunction(C_CloseAllSessions, func, rv, NUM2HANDLE(slot_id)); if(rv != CKR_OK) pkcs11_raise(self,rv); return self;}
开发者ID:cprice404,项目名称:pkcs11,代码行数:12,
注:本文中的CallFunction函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CallGetService函数代码示例 C++ CallEvent函数代码示例 |