当前位置: 首页>>代码示例>>C++>>正文


C++ Unload函数代码示例

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


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

示例1: Unload

NPC::~NPC() {
	Unload();
}
开发者ID:pandaforks,项目名称:Mirage--,代码行数:3,代码来源:NPC.cpp

示例2: Unload

Win32DllLoader::~Win32DllLoader()
{
  if (m_dllHandle)
    Unload();
  DllLoaderContainer::UnRegisterDll(this);
}
开发者ID:CaptainRewind,项目名称:xbmc,代码行数:6,代码来源:Win32DllLoader.cpp

示例3: Unload

void CSkin::Load(LPCTSTR pszFile)
{
	Unload();

	FILE* fp = NULL;
	COLORREF cr;
	TCHAR szBuff[MAX_PATH];
	TCHAR szBase[MAX_PATH];
	TCHAR szPath[MAX_PATH];
	HINSTANCE hInst = GetInst();

	*szBase = NULL;
	if (pszFile && _tcslen(pszFile)) {
	// ファイルを開く
#ifdef _UNICODE
		char szFile[MAX_PATH * 2];
		WideCharToMultiByte(CP_ACP, NULL, pszFile, -1, szFile, MAX_PATH, NULL, NULL);
		fp = fopen(szFile, "r");
#else
		fp = fopen(pszFile, "r");
#endif
		_tcscpy(szBase, pszFile);
		LPTSTR p = _tcsrchr(szBase, _T('\\'));
		if (p) *(p + 1) = NULL;
	}

	// Version
	int nVersion = SKIN_CURRENT_VERSION;
	if (GetKeyString(fp, SECTION_SKIN, KEY_VERSION, szBuff))
		nVersion = _tcstol(szBuff, NULL, 10);

	// Background
	GetKeyString(fp, SECTION_SKIN, KEY_BKGROUND, szBuff);
	wsprintf(szPath, _T("%s%s"), szBase, szBuff);
	m_hbmpBkgnd = LoadBitmap(szPath);
#ifndef _WIN32_WCE_PPC
	if (!m_hbmpBkgnd)
		m_hbmpBkgnd = ::LoadBitmap(hInst, (LPCTSTR)IDB_BACK);
#endif

	// Number
	GetKeyString(fp, SECTION_SKIN, KEY_NUMBER, szBuff);
	wsprintf(szPath, _T("%s%s"), szBase, szBuff);
	m_himlImageLists[IMAGELIST_NUMBER] = 
		LoadImageList(IML_NUMBER_WIDTH, IML_NUMBER_HEIGHT, szPath, IDB_NUMBER);
	
	// Status
	GetKeyString(fp, SECTION_SKIN, KEY_STATUS, szBuff);
	wsprintf(szPath, _T("%s%s"), szBase, szBuff);
	m_himlImageLists[IMAGELIST_STATUS] = 
		LoadImageList(IML_STATUS_WIDTH, IML_STATUS_HEIGHT, szPath, IDB_STATUS);
	
	// PlayOption
	GetKeyString(fp, SECTION_SKIN, KEY_PLAYOPT, szBuff);
	wsprintf(szPath, _T("%s%s"), szBase, szBuff);
	m_himlImageLists[IMAGELIST_PLAYOPT] = 
		LoadImageList(IML_PLAYOPT_WIDTH, IML_PLAYOPT_HEIGHT, szPath, IDB_PLAYOPTION);
	
	// Disp
	GetKeyString(fp, SECTION_SKIN, KEY_DISP, szBuff);
	if (_tcslen(szBuff))
		m_fDispVisible = _tcstol(szBuff, 0, 10) ? TRUE : FALSE; 

	// DispColor 
	GetKeyString(fp, SECTION_SKIN, KEY_DISPCOLOR, szBuff);
	cr = StrToColor(szBuff);
	if (cr != -1)
		m_nColors[COLOR_DISP] = cr;
	
	// PeekColorL
	GetKeyString(fp, SECTION_SKIN, KEY_PEEKCOLORL, szBuff);
	cr = StrToColor(szBuff);
	if (cr != -1)
		m_nColors[COLOR_PEEKL] = cr;

	// PeekColorR
	GetKeyString(fp, SECTION_SKIN, KEY_PEEKCOLORR, szBuff);
	cr = StrToColor(szBuff);
	if (cr != -1)
		m_nColors[COLOR_PEEKR] = cr;

	// InfoColor
	GetKeyString(fp, SECTION_SKIN, KEY_INFOCOLOR, szBuff);
	cr = StrToColor(szBuff);
	if (cr != -1)
		m_nColors[COLOR_INFO] = cr;

	// TitleColor
	GetKeyString(fp, SECTION_SKIN, KEY_TITLECOLOR, szBuff);
	cr = StrToColor(szBuff);
	if (cr != -1)
		m_nColors[COLOR_TITLE] = cr;

	// SeekColor
	GetKeyString(fp, SECTION_SKIN, KEY_SEEKCOLOR, szBuff);
	cr = StrToColor(szBuff);
	if (cr != -1)
		m_nColors[COLOR_SEEK] = cr;

	if (nVersion < SKIN_CURRENT_VERSION) {
//.........这里部分代码省略.........
开发者ID:afriza,项目名称:GSPlayer,代码行数:101,代码来源:Skin.cpp

示例4:

EDetailManager::~EDetailManager(){
//.	Device.seqDevCreate.Remove(this);
//.	Device.seqDevDestroy.Remove(this);
	Clear	();
    Unload	();
}
开发者ID:2asoft,项目名称:xray,代码行数:6,代码来源:ESceneDOTools.cpp

示例5: Unload

EyeAnglesTester::~EyeAnglesTester ( void )
{
	Unload ();
}
开发者ID:L-EARN,项目名称:NoCheatZ-4,代码行数:4,代码来源:EyeAnglesTester.cpp

示例6: Unload

GUIManager::~GUIManager( )
{
	Unload( );
}
开发者ID:jimmiebergmann,项目名称:Bit-Engine-Examples,代码行数:4,代码来源:GUIManager.cpp

示例7: Unload

CslGeoIP::~CslGeoIP()
{
    Unload();

    WX_CLEAR_ARRAY(m_services);
}
开发者ID:aurhat,项目名称:cubelister,代码行数:6,代码来源:CslGeoIP.cpp

示例8: Unload

MappyLevel::~MappyLevel(){
	Unload();
}
开发者ID:Hypervariate,项目名称:Orchid,代码行数:3,代码来源:MappyLevel.cpp

示例9: Unload

//--------------------------------------------------------------------------
VeShaderResource::~VeShaderResource()
{
	Unload();
}
开发者ID:snailwork,项目名称:Texas-cs,代码行数:5,代码来源:VeRenderResource.cpp

示例10: defined


//.........这里部分代码省略.........
      return false;
   }

   // Attempt to open it
   mModule = dlopen((char *) exePath, RTLD_NOW | RTLD_LOCAL);
   if (mModule == NULL) {
      CFRelease(bundleRef);
      return false;
   }

   // Try to locate the new plugin entry point
   pluginMain = (vstPluginMain) dlsym(mModule, "VSTPluginMain");

   // If not found, try finding the old entry point
   if (pluginMain == NULL) {
      pluginMain = (vstPluginMain) dlsym(mModule, "main_macho");
   }

   // Must not be a VST plugin
   if (pluginMain == NULL) {
      dlclose(mModule);
      mModule = NULL;
      CFRelease(bundleRef);
      return false;
   }

   // Need to keep the bundle reference around so we can map the
   // resources.
   mBundleRef = bundleRef;

   // Open the resource map ... some plugins (like GRM Tools) need this.
   mResource = (int) CFBundleOpenBundleResourceMap(bundleRef);

#else

   {
      wxLogNull nolog;

      // Try to load the library
      wxDynamicLibrary *lib = new wxDynamicLibrary(mPath);
      if (!lib) {
         return false;
      }

      // Bail if it wasn't successful
      if (!lib->IsLoaded()) {
         delete lib;
         return false;
      }

      // Try to find the entry point, while suppressing error messages
      pluginMain = (vstPluginMain) lib->GetSymbol(wxT("VSTPluginMain"));
      if (pluginMain == NULL) {
         pluginMain = (vstPluginMain) lib->GetSymbol(wxT("main"));
         if (pluginMain == NULL) {
            delete lib;
            return false;
         }
      }

      // Save the library reference
      mModule = lib;
   }

#endif

   // Initialize the plugin
   mAEffect = pluginMain(audioMaster);

   // Was it successful?
   if (mAEffect) {
      //
      mAEffect->user = this;

      //
      callDispatcher(effOpen, 0, 0, NULL, 0.0);

      // Ensure that it looks like a plugin and can deal with ProcessReplacing
      // calls.  Also exclude synths for now.
      if (mAEffect->magic == kEffectMagic &&
         !(mAEffect->flags & effFlagsIsSynth) &&
         mAEffect->flags & effFlagsCanReplacing) {

         mVendor = GetString(effGetVendorString);
         mName = GetString(effGetEffectName);
         mInputs = mAEffect->numInputs;
         mOutputs = mAEffect->numOutputs;
         
         // We could even go so far as to run a small test here.

         success = true;
      }
   }

   if (!success) {
      Unload();
   }

   return success;
}
开发者ID:Kassen,项目名称:chugins,代码行数:101,代码来源:VSTEffect.cpp

示例11: Unload

CProjectDBI::~CProjectDBI ()
{
    Unload ();
}
开发者ID:LM25TTD,项目名称:ATCMcontrol_Engineering,代码行数:4,代码来源:ProjectDBI.cpp

示例12: Unload

VSTEffect::~VSTEffect()
{
   Unload();
}
开发者ID:Kassen,项目名称:chugins,代码行数:4,代码来源:VSTEffect.cpp

示例13: Unload

 virtual ~PosixSharedLibrary() {
     Unload();
 }
开发者ID:prestocore,项目名称:browser,代码行数:3,代码来源:posix_so.cpp

示例14: Unload

/**
*  @brief
*    Destructor
*/
Source::~Source()
{
	// Unload buffer
	Unload();
}
开发者ID:ByeDream,项目名称:pixellight,代码行数:9,代码来源:Source.cpp

示例15: Unload

	void TTFFontAsset::Reload()
	{
		Unload();
		Load(filename, size, textureWidth, textureHeight, glyphRanges);
	}
开发者ID:gmacd,项目名称:Monocle-Engine,代码行数:5,代码来源:OpenGLTTFFontAsset.cpp


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