• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetModule函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetModule函数的典型用法代码示例。如果您正苦于以下问题:C++ GetModule函数的具体用法?C++ GetModule怎么用?C++ GetModule使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetModule函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GetModule

bool ModuleContainer::RemoveModule(uint32 itemID)
{
    GenericModule * mod = GetModule(itemID);

	if( mod == NULL )
		return false;	// NO module pointer found at this slot flag, DO NOT attempt to dereference

    _removeModule(mod->flag(), mod);

    //delete the module
    delete mod;
    mod = NULL;

	return true;
}
开发者ID:comet0,项目名称:evemu_server,代码行数:15,代码来源:ModuleManager.cpp


示例2: PELOTON_ASSERT

llvm::Value *CodeGen::CallMulWithOverflow(llvm::Value *left, llvm::Value *right,
                                          llvm::Value *&overflow_bit) {
  PELOTON_ASSERT(left->getType() == right->getType());
  llvm::Function *mul_func = llvm::Intrinsic::getDeclaration(
      &GetModule(), llvm::Intrinsic::smul_with_overflow, left->getType());

  // Perform the multiplication
  llvm::Value *mul_result = CallFunc(mul_func, {left, right});

  // Pull out the overflow bit from the resulting aggregate/struct
  overflow_bit = GetBuilder().CreateExtractValue(mul_result, 1);

  // Pull out the actual result of the subtraction
  return GetBuilder().CreateExtractValue(mul_result, 0);
}
开发者ID:camellyx,项目名称:peloton,代码行数:15,代码来源:codegen.cpp


示例3: assert

bool CFlowGraphModuleManager::DeleteModuleXML( const char* moduleName )
{
	if(m_ModulesPathInfo.empty())
		return false;

	TModulesPathInfo::iterator modulePathEntry = m_ModulesPathInfo.find(moduleName);
	if (m_ModulesPathInfo.end() != modulePathEntry)
	{
		if(remove(modulePathEntry->second) == 0)
		{
			m_ModulesPathInfo.erase(moduleName);

			// also remove module itself
			TModuleIdMap::iterator idIt = m_ModuleIds.find(moduleName);
			assert(idIt != m_ModuleIds.end());
			TModuleId id = idIt->second;
			TModuleMap::iterator modIt = m_Modules.find(id);
			assert(modIt != m_Modules.end());

			if(modIt != m_Modules.end() && idIt != m_ModuleIds.end())
			{
				for(CListenerSet<IFlowGraphModuleListener*>::Notifier notifier(m_listeners); notifier.IsValid(); notifier.Next() )
				{
					notifier->OnModuleDestroyed(GetModule(id));
				}

				m_Modules[id]->Destroy();
				delete m_Modules[id];
				m_Modules[id] = NULL;

				m_ModuleIds.erase(idIt);
				m_Modules.erase(modIt);

				if (m_Modules.empty())
					m_moduleIdMaker = 0;

				for(CListenerSet<IFlowGraphModuleListener*>::Notifier notifier(m_listeners); notifier.IsValid(); notifier.Next() )
				{
						notifier->OnPostModuleDestroyed();
				}
			}

			return true;
		}
	}
	
	return false;
}
开发者ID:aronarts,项目名称:FireNET,代码行数:48,代码来源:ModuleManager.cpp


示例4: LoadDll

LibraryLoader* LoaderContainer::FindModule(const char* sName, const char* sCurrentDir, bool bLoadSymbols)
{
	if (CURL::IsFullPath(sName)) 
	{ //  Has a path, just try to load
		return LoadDll(sName, bLoadSymbols);
	}

	if (sCurrentDir) 
	{ // in the path of the parent dll?
		std::string strPath = sCurrentDir;
		strPath += sName;

		LibraryLoader* pLoader = LoadDll(strPath.c_str(), bLoadSymbols);
		if (pLoader)
			return pLoader;
	}

	//  in environment variable?
	StringArray vecEnv;

	StringUtils::SplitString(ENV_PATH, ";", vecEnv);
	LibraryLoader* pDll = NULL;

	for (int i = 0; i < (int)vecEnv.size(); ++i) 
	{
		std::string strPath = vecEnv[i];
		strPath += '/';

#ifdef LOGALL
		LOGDEBUG("Searching for the dll %s in directory %s", sName, strPath.c_str());
#endif
		strPath += sName;

		// Have we already loaded this dll
		if ((pDll = GetModule(strPath.c_str())) != NULL)
			return pDll;

		if ((pDll = LoadDll(strPath.c_str(), bLoadSymbols)) != NULL)
			return pDll;
	}

	// can't find it in any of our paths - could be a system dll
	if ((pDll = LoadDll(sName, bLoadSymbols)) != NULL)
		return pDll;

	LOGDEBUG("Dll %s was not found in path", sName);
	return NULL;
}
开发者ID:mrxordi,项目名称:XRFramework,代码行数:48,代码来源:LoaderContainer.cpp


示例5: OnModuleFinished

void CFlowGraphModuleManager::OnModuleFinished(TModuleId const& moduleId, TModuleInstanceId instanceId, bool bSuccess, TModuleParams const& params)
{
	TModuleMap::iterator moduleEntry = m_Modules.find(moduleId);
	if (m_Modules.end() != moduleEntry)
	{
		CFlowGraphModule *pModule = moduleEntry->second;
		if (pModule)
		{
			for(CListenerSet<IFlowGraphModuleListener*>::Notifier notifier(m_listeners); notifier.IsValid(); notifier.Next() )
			{
				notifier->OnModuleInstanceDestroyed(GetModule(pModule->GetId()), instanceId);
			}
			pModule->DestroyInstance(instanceId, bSuccess, params);
		}
	}
}
开发者ID:aronarts,项目名称:FireNET,代码行数:16,代码来源:ModuleManager.cpp


示例6: clsLogAutoPtr

JEventBody* JModuleThread::MakeEventBody(JEVT_TYPE eType, JCHAR* pModName)
{
	JEventBody* pEventBody = JNULL;
	JModule* pModule = JNULL;

    JLogAutoPtr clsLogAutoPtr(JSingleton<JLog>::instance(), 
        JLOG_MOD_THREAD, "JModuleThread::MakeEventBody");

	pModule = GetModule(pModName);
	if (pModule)
	{
		pEventBody = pModule->MakeEventBody(static_cast<JUINT32>(eType));
	}

	return pEventBody;
}
开发者ID:gothame,项目名称:jphone,代码行数:16,代码来源:JThread.cpp


示例7: GetModule

    void FunctionInstance::Read(ModuleReader &reader, const MemberHeader &header)
    {
        // Read the function id.
        uint32_t functionId;
        reader >> functionId;

        // Get the function.
        Module *module = GetModule();
        function = module->GetFunction(functionId);

        // Read the generic instance
        instance.Read(reader);

        // Use the function generic prototype.
        instance.SetPrototype(function->GetGenericPrototype());
    }
开发者ID:ronsaldo,项目名称:chela,代码行数:16,代码来源:FunctionInstance.cpp


示例8: GetModule

CExeModuleInstance* CRunningProcesses::GetProcessById(DWORD dwProcessId)
{
	CExeModuleInstance* pResult = NULL;
	CExeModuleInstance* pProcess;

	for (DWORD i = 0; i < GetCount(); i++)
	{
		pProcess = static_cast<CExeModuleInstance*>( GetModule(i) );
		if (pProcess->Get_ProcessId() == dwProcessId)
		{
			pResult = pProcess;
			break;
		} // if
	} // for
	return pResult;
}
开发者ID:anshulgoel27,项目名称:WinValgrind,代码行数:16,代码来源:ModuleInstance.cpp


示例9: TRACE_BEGIN

ErrorCode ComponentManager::LoadLibrary( const char *name )
{
	TRACE_BEGIN( LOG_LVL_INFO );
	IModule *mod = NULL;
	ErrorCode result = kNoError;
	
	LOG_NOTICE( "Opening Library: %s", name );
	
	ErrorCode (*LoadLibrary)( IComponentManager *mgr );
	IModule *(*GetModule)();
	void *handle = dlopen( name, RTLD_LAZY );
	
	if ( handle == NULL )
	{
		result = kLoadFailed;
		LOG_WARN( "Failed to open shared lib \"%s\": %s", name, dlerror() );
	}
	else
	{
		LoadLibrary = (ErrorCode (*)(IComponentManager *mgr))dlsym( handle, "JHCOM_LibraryEntry" );
		GetModule = (IModule *(*)())dlsym( handle, "JHCOM_GetModule" );

		if ( GetModule == NULL || LoadLibrary == NULL )
		{
			result = kLoadFailed;
			LOG_WARN( "Failed to get symbol" );
		}
		else
		{
			LOG( "LoadLibrary is %p", LoadLibrary );
			LOG( "RegisterServices is %p", GetModule );
			result = LoadLibrary( this );
			
			if ( result == kNoError )
			{
				mod = GetModule();
				mod->AddRef();
				mod->loadComponents();
				ModuleInfo *info = jh_new ModuleInfo( name, mod, handle );
				mModules.push_back( info );
			}
		}
	}
	
	return result;
}
开发者ID:benpayne,项目名称:jhcommon,代码行数:46,代码来源:ComponentManager.cpp


示例10: qDebug

void GadWorkspace::newObject(int index, int x, int y)
{
  qDebug("GadWorksapce::newObject(%d, (%d,%d))\n", index, x, y);
  if (!classNameMenu_)
    return;
  if (index < 0)
    return;
  qDebug("  className=%s\n   name=%s\n",
         (const char *) classNameMenu_[index].className,
         (const char *) classNameMenu_[index].name);
  GadModule *module = GetModule(*classDict_,
                                classNameMenu_[index].className,
                                classNameMenu_[index].name);
  GadObject *obj = new GadObject(module, this);
  obj->move(x, y);
  obj->show();
  resize();
}
开发者ID:BackupTheBerlios,项目名称:geoaida-svn,代码行数:18,代码来源:GadWorkspace.cpp


示例11: text

void CException::ReportStd(ostream& out, TDiagPostFlags flags) const
{
    string text(GetMsg());
    string err_type(GetType());
    err_type += "::";
    err_type += GetErrCodeString();
    SDiagMessage diagmsg(
        GetSeverity(),
        text.c_str(),
        text.size(),
        GetFile().c_str(),
        GetLine(),
        flags, NULL, 0, 0, err_type.c_str(),
        GetModule().c_str(),
        GetClass().c_str(),
        GetFunction().c_str());
    diagmsg.Write(out, SDiagMessage::fNoEndl | SDiagMessage::fNoPrefix);
}
开发者ID:swuecho,项目名称:igblast,代码行数:18,代码来源:ncbiexpt.cpp


示例12: LoadModuleGraph

void CFlowGraphModuleManager::LoadModuleGraph(const char* moduleName, const char* fileName)
{
	// first check for existing module - must exist by this point
	CFlowGraphModule *pModule = static_cast<CFlowGraphModule*>(GetModule(moduleName));

	assert(pModule);

	if(pModule)
	{
		if (pModule->LoadModuleGraph(moduleName, fileName))
		{
			for(CListenerSet<IFlowGraphModuleListener*>::Notifier notifier(m_listeners); notifier.IsValid(); notifier.Next() )
			{
				notifier->OnRootGraphChanged(pModule);
			}
		}		
	}
}
开发者ID:aronarts,项目名称:FireNET,代码行数:18,代码来源:ModuleManager.cpp


示例13: UpdateVersionsCombo

void CreateProjectDlg::UpdateVersionsCombo()
{
	wxArrayString versions;

	if ( Lua::Get().call( "getModuleVersions", GetModule().ToStdString() ) )
	{
		Helpers::PullTableOfStrings( versions );
	}

	mVersionsCombo->Clear();

	if (versions.size() > 0)
	{
		mVersionsCombo->Append( versions );
		mVersionsCombo->SetSelection(0);
	}

	mVersionsCombo->Enable(versions.size() > 0);
}
开发者ID:mauzerX,项目名称:universal-translators-tool,代码行数:19,代码来源:createdlgimpl.cpp


示例14: GetModule

    llvm::GlobalVariable *Property::GetMemberInfo()
    {
        if(!propertyInfo)
        {
            // Only create the property info variable when reflection is enabled.
            Module *module = GetModule();
            if(!module->HasReflection())
                return NULL;

            // Get the property info class.
            VirtualMachine *vm = module->GetVirtualMachine();
            Class *propInfoClass = vm->GetPropertyInfoClass();
            llvm::Module *targetModule = module->GetTargetModule();
            propertyInfo = new llvm::GlobalVariable(*targetModule, propInfoClass->GetTargetType(),
                                    false, ComputeMetadataLinkage(), NULL, GetMangledName() + "_propinfo_");
        }

        return propertyInfo;
    }
开发者ID:ronsaldo,项目名称:chela,代码行数:19,代码来源:Property.cpp


示例15: LookupBuiltin

// Register the given function symbol and the LLVM function type it represents
llvm::Function *CodeGen::RegisterBuiltin(const std::string &fn_name,
                                         llvm::FunctionType *fn_type,
                                         void *func_impl) {
  // Check if this is already registered as a built in, quit if to
  auto *builtin = LookupBuiltin(fn_name);
  if (builtin != nullptr) {
    return builtin;
  }

  // TODO: Function attributes here
  // Construct the function
  auto *function = llvm::Function::Create(
      fn_type, llvm::Function::ExternalLinkage, fn_name, &GetModule());

  // Register the function in the context
  code_context_.RegisterBuiltin(function, func_impl);

  // That's it
  return function;
}
开发者ID:camellyx,项目名称:peloton,代码行数:21,代码来源:codegen.cpp


示例16: PreLoadModuleFile

CFlowGraphModule* CFlowGraphModuleManager::PreLoadModuleFile(const char* moduleName, const char* fileName, bool bGlobal)
{
	// NB: the module name passed in might be a best guess based on the filename. The actual name
	// comes from within the module xml.

	// first check for existing module
	CFlowGraphModule *pModule = static_cast<CFlowGraphModule*>(GetModule(moduleName));

	if(pModule)
	{
		for(CListenerSet<IFlowGraphModuleListener*>::Notifier notifier(m_listeners); notifier.IsValid(); notifier.Next() )
		{
			notifier->OnModuleDestroyed(pModule);
		}
		// exists, reload 
		pModule->Destroy();
		pModule->PreLoadModule(fileName);

		for(CListenerSet<IFlowGraphModuleListener*>::Notifier notifier(m_listeners); notifier.IsValid(); notifier.Next() )
		{
				notifier->OnPostModuleDestroyed();
		}
	}
	else
	{
		// not found, create

		pModule = new CFlowGraphModule(m_moduleIdMaker++);
		pModule->SetType(bGlobal ? IFlowGraphModule::eT_Global : IFlowGraphModule::eT_Level);

		TModuleId id = pModule->GetId();
		m_Modules[id] = pModule;

		pModule->PreLoadModule(fileName);
		AddModulePathInfo(pModule->GetName(), fileName);

		m_ModuleIds[pModule->GetName()] = id;
	}

	return pModule;
}
开发者ID:aronarts,项目名称:FireNET,代码行数:41,代码来源:ModuleManager.cpp


示例17: SetCursor

//
/// Loads a "hand" cursor from the winhlp32.exe module.
//
/// \note It appeared in Paul DiLascia's Jan 1998 MSJ articles.
void
TUrlLink::SetupCursor()
{
  SetCursor(GetModule(), IDC_HANDCURSOR);
  if(HCursor == 0){
    // if was problem try load cursor from winhlp32.exe
    // Get the windows directory
    TAPointer<tchar> Buffer(new tchar[MAX_PATH]);
    ::GetWindowsDirectory(Buffer, MAX_PATH);
     _tcscat(Buffer,_T("\\winhlp32.exe"));
    // This retrieves cursor #106 from winhlp32.exe, which is a hand pointer
    HMODULE hModule = ::LoadLibrary(Buffer);
    if (hModule) {
      HCURSOR hHandCursor = ::LoadCursor(hModule, TResId(106));
      if (hHandCursor)
        HCursor = CopyCursor(hHandCursor); // it is a macro in Win32

      ::FreeLibrary(hModule);
    }
  }
}
开发者ID:Meridian59,项目名称:Meridian59,代码行数:25,代码来源:urllink.cpp


示例18: GetClassName

/// Override TWindow virtual member function to fills out information about the
/// Window class associated with a TUrlLink control. 
/// \note The class information is based on the system's "STATIC" class.
//
void
TUrlLink::GetWindowClass(WNDCLASS& wndClass)
{
  // Grab a the attributes of the native "STATIC" control
  if (::GetClassInfo(0, _T("STATIC"), &wndClass)){
    wndClass.hInstance       = *GetModule();
    wndClass.style           = CS_HREDRAW|CS_VREDRAW|CS_PARENTDC;
    wndClass.lpszClassName   = GetClassName();
    wndClass.lpfnWndProc     = UrlLinkProc;
    wndClass.hCursor         = HCursor;
    //wndClass.hbrBackground  = HBRUSH(COLOR_BTNFACE+1);
    wndClass.hbrBackground  = NULL; // Use the background of the parent
  }
  else {
    TStatic::GetWindowClass(wndClass);
    wndClass.style           = CS_HREDRAW|CS_VREDRAW|CS_PARENTDC;
    //wndClass.hbrBackground  = HBRUSH(COLOR_BTNFACE+1);
    wndClass.hbrBackground  = NULL; // Use the background of the parent
    wndClass.hCursor         = HCursor;
  }
}
开发者ID:Meridian59,项目名称:Meridian59,代码行数:25,代码来源:urllink.cpp


示例19: GetModule

bool Cx_PluginLoader::RegisterPlugin(HMODULE instance)
{
    if (FindModule(instance) >= 0)
    {
        return false;
    }

    Ix_Module* pModule = GetModule(instance);

    if (pModule != NULL)
    {
        MODULE moduleInfo;

        moduleInfo.hdll = instance;
        moduleInfo.module = pModule;
        moduleInfo.owned = false;
        moduleInfo.inited = false;
        GetModuleFileNameW(moduleInfo.hdll, moduleInfo.filename, MAX_PATH);

        int moduleIndex = GetPluginIndex(moduleInfo.filename);
        if (moduleIndex >= 0)
        {
            ASSERT(m_modules[moduleIndex] != NULL);
            *m_modules[moduleIndex] = moduleInfo;
        }
        else
        {
            moduleIndex = x3::GetSize(m_modules);
            MODULE* module = new MODULE;
            *module = moduleInfo;
            m_modules.push_back(module);
        }

        RegisterClassEntryTable(moduleIndex);

        return true;
    }

    return false;
}
开发者ID:1070094289,项目名称:x3c,代码行数:40,代码来源:Cx_PluginLoader.cpp


示例20: IF_FAILED_RET

//----------------------------------------------------------------------------
//  LoadModule
HRESULT CMagpieApplication::LoadModule(
  CMagpieModule           *   pSrcModule,
  LPCOLESTR                   lpszModuleID,
  CMagpieModuleComObject  *&  pRet)
{
  CString sModuleID;
  IF_FAILED_RET(ResolveModuleID(
    pSrcModule, lpszModuleID, sModuleID));

  CComPtr<CMagpieModuleComObject> module;

  // is the module already loaded?
  HRESULT hr = E_FAIL;
  hr = GetModule(sModuleID, module.p);
  if (SUCCEEDED(hr))
  {
    // yes, return module
    pRet = module.Detach();
    return S_FALSE;  // means: already loaded
  }

  // create a real path from the module ID...
  CString sModulePath, sModuleIDPath(sModuleID);
  sModuleIDPath.Replace(_T('/'), _T('\\'));
  // ...assuming that the file type is always 'js'
  // @TODO: Might change in future.
  sModulePath = m_RootPath + sModuleIDPath + _T(".js");

  if (!PathFileExists(sModulePath))
  {
    return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
  }

  IF_FAILED_RET(CMagpieModule::CreateObject(
    *this, sModuleID, sModulePath, module.p));

  m_Modules[sModuleID] = module;
  pRet = module.Detach();
  return S_OK;
}
开发者ID:ondravondra,项目名称:adobo-ie,代码行数:42,代码来源:MagpieApplication.cpp



注:本文中的GetModule函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetModuleBaseName函数代码示例发布时间:2022-05-30
下一篇:
C++ GetModelPtr函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap