这篇教程C++ unload_add_on函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中unload_add_on函数的典型用法代码示例。如果您正苦于以下问题:C++ unload_add_on函数的具体用法?C++ unload_add_on怎么用?C++ unload_add_on使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了unload_add_on函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: dirstatus_t TEncoderAddonManager::LoadAddons(const char *addondDir){ fp_text_convert_t fp_text_convert; image_id id; BDirectory dir(addondDir); BEntry entry; // load encoders add-on while (dir.GetNextEntry(&entry) == B_OK) { BPath addonPath(&entry); if ((id = load_add_on(addonPath.Path())) < 0) continue; if (get_image_symbol(id, "fp_text_convert", B_SYMBOL_TYPE_TEXT, (void **)&fp_text_convert)) { unload_add_on(id); continue; } encoder_addon_t *addon = (encoder_addon_t *)malloc(sizeof(encoder_addon_t)); if (!addon) { fprintf(stderr, "%s/n", strerror(ENOMEM)); unload_add_on(id); return ENOMEM; } addon->id = id; addon->fp_text_convert = fp_text_convert; strncpy(addon->name, addonPath.Leaf(), sizeof(addon->name)); fEncoderAddonList.AddItem(addon); fprintf(stderr, "load: %s/n", addon->name); } return B_OK;}
开发者ID:HaikuArchives,项目名称:FtpPositive,代码行数:29,
示例2: unload_add_onvoidCayaProtocolAddOn::_Init(){ const char* (*signature)(); const char* (*friendly_signature)(); fStatus = B_OK; if (get_image_symbol(fImage, "protocol", B_SYMBOL_TYPE_TEXT, (void**)&fGetProtocol) != B_OK) { unload_add_on(fImage); fStatus = B_ERROR; return; } if (get_image_symbol(fImage, "signature", B_SYMBOL_TYPE_TEXT, (void**)&signature) != B_OK) { unload_add_on(fImage); fStatus = B_ERROR; return; } if (get_image_symbol(fImage, "friendly_signature", B_SYMBOL_TYPE_TEXT, (void**)&friendly_signature) != B_OK) { unload_add_on(fImage); fStatus = B_ERROR; return; } fSignature = signature(); fFriendlySignature = friendly_signature();}
开发者ID:ModeenF,项目名称:Caya,代码行数:32,
示例3: unload_add_onPrinterDriverAddOn::~PrinterDriverAddOn(){ if (IsLoaded()) { unload_add_on(fAddOnID); fAddOnID = -1; }}
开发者ID:mmadia,项目名称:Haiku-services-branch,代码行数:7,
示例4: pathboolBTranslatorRoster::IsTranslator(entry_ref* ref){ if (ref == NULL) return false; BPath path(ref); image_id image = load_add_on(path.Path()); if (image < B_OK) return false; // Function pointer used to create post R4.5 style translators BTranslator* (*makeNthTranslator)(int32 n, image_id you, uint32 flags, ...); status_t status = get_image_symbol(image, "make_nth_translator", B_SYMBOL_TYPE_TEXT, (void**)&makeNthTranslator); if (status < B_OK) { // If this is a translator add-on, it is in the C format translator_data translatorData; status = fPrivate->GetTranslatorData(image, translatorData); } unload_add_on(image); return status == B_OK;}
开发者ID:mylegacy,项目名称:haiku,代码行数:25,
示例5: TRACEvoidPluginManager::PutPlugin(MediaPlugin* plugin){ TRACE("PluginManager::PutPlugin()/n"); fLocker.Lock(); plugin_info* pinfo; for (fPluginList.Rewind(); fPluginList.GetNext(&pinfo); ) { if (plugin == pinfo->plugin) { pinfo->usecount--; if (pinfo->usecount == 0) { TRACE(" deleting %p/n", pinfo->plugin); delete pinfo->plugin; TRACE(" unloading add-on: %ld/n/n", pinfo->image); unload_add_on(pinfo->image); fPluginList.RemoveCurrent(); } fLocker.Unlock(); return; } } printf("PluginManager: Error, can't put PlugIn %p/n", plugin); fLocker.Unlock();}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:27,
示例6: beos_unloadstatic int beos_unload (DSO * dso){ image_id id; if (dso == NULL) { DSOerr (DSO_F_BEOS_UNLOAD, ERR_R_PASSED_NULL_PARAMETER); return (0); } if (sk_num (dso->meth_data) < 1) return (1); id = (image_id) sk_pop (dso->meth_data); if (id < 1) { DSOerr (DSO_F_BEOS_UNLOAD, DSO_R_NULL_HANDLE); return (0); } if (unload_add_on (id) != B_OK) { DSOerr (DSO_F_BEOS_UNLOAD, DSO_R_UNLOAD_FAILED); /* We should push the value back onto the stack in * case of a retry. */ sk_push (dso->meth_data, (char *) id); return (0); } return (1);}
开发者ID:274914765,项目名称:C,代码行数:27,
示例7: load_add_onbool BeHappy::CheckAddOn(const char *path,bool alert,BString *pName){ image_id addOnImage = load_add_on(path); void *instFunc; const char **projName; const uint16 *BHVersion,*BHVLastCompatible; bool ok = false; BPath aoPath(path); BString alTxt(aoPath.Leaf()); // cha C++ unlock函数代码示例 C++ unload函数代码示例
|