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


C++ DeInit函数代码示例

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


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

示例1: LOG_ERROR

OMX_ERRORTYPE TextSource::Init()
{
    CPresult ret = 0;
    ret = mPipe->Open(&mHandle, mUrl, CP_AccessRead);
    if(ret != 0) {
        LOG_ERROR("Can't open content: %s\n", mUrl);
        return OMX_ErrorUndefined;
    }

    mBuffer = (OMX_U8*)FSL_MALLOC(mBufferSize);
    if(mBuffer == NULL) {
        DeInit();
        return OMX_ErrorInsufficientResources;
    }

    mCache = (OMX_U8*)FSL_MALLOC(mCacheSize);
    if(mCache == NULL) {
        DeInit();
        return OMX_ErrorInsufficientResources;
    }
    mCacheRead = mCacheFill = 0;
    mOffset = 0;

    return OMX_ErrorNone;
}
开发者ID:primiano,项目名称:udoo_external_fsl_imx_omx,代码行数:25,代码来源:GMSubtitleSource.cpp

示例2: WinProc

LRESULT CALLBACK WinProc(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    LONG    lRet = 0; 
    PAINTSTRUCT    ps;

    switch (uMsg)
	{ 
    case WM_SIZE:										// If the window is resized
		if(!g_bFullScreen)								// Do this only if we are NOT in full screen
		{
			SizeOpenGLScreen(LOWORD(lParam),HIWORD(lParam));// LoWord=Width, HiWord=Height
			GetClientRect(hWnd, &g_rRect);					// Get the window rectangle
		}
        break; 
 
	case WM_PAINT:										// If we need to repaint the scene
		BeginPaint(hWnd, &ps);							// Init the paint struct		
		EndPaint(hWnd, &ps);							// EndPaint, Clean up
		break;

	case WM_KEYDOWN:
		if(wParam == VK_ESCAPE)	DeInit();				// Quit if we pressed ESCAPE
		break;
 
    case WM_DESTROY:									// If the window is destroyed
        DeInit();										// Release memory and restore settings
        break; 
     
    default:											// Return by default
        lRet = DefWindowProc (hWnd, uMsg, wParam, lParam); 
        break; 
    } 
 
    return lRet;										// Return by default
}
开发者ID:JasonLee12345,项目名称:tutorials,代码行数:35,代码来源:Main.cpp

示例3: DeInit

/**
*  @brief
*    Initializes the window connection
*/
void WindowConnection::Initialize(const DisplayMode *pDisplayMode, bool bFullscreen)
{
    // De-init window
    DeInit();

    // Display mode information given?
    if (pDisplayMode) {
        // Just copy over the given information
        m_sDisplayMode = *pDisplayMode;
    } else {
        // Use default settings
        m_sDisplayMode.vSize      = m_pWidget->GetSize();
        m_sDisplayMode.nColorBits = 32;
        m_sDisplayMode.nFrequency = 60;
    }

    // Initialize renderer surface handler
    InitWidget(bFullscreen);

    // Emit the initial events so other components can set their proper initial states
    if (bFullscreen)
        OnFullscreenMode();
    else
        OnDisplayMode();
}
开发者ID:ByeDream,项目名称:pixellight,代码行数:29,代码来源:WindowConnection.cpp

示例4: PreInit

void CService::ServiceMainMember(DWORD argc, LPTSTR* argv, LPHANDLER_FUNCTION pf, LPTHREAD_START_ROUTINE pfnWTP)
{
    DWORD dwErr = 0;

   __try
    {
        PreInit();
        SetupHandlerInside(pf);
        LaunchWatcherThread(pfnWTP);
        SetStatus(SERVICE_START_PENDING, 1, kDefaultWaitTime );
        if ( NTService::InitializeService( _theService, _params, false ) == 0 )
        {
            SetStatus( SERVICE_RUNNING, 0, 0, SERVICE_ACCEPT_STOP );
            _theService->start();
        }
        else
        {
            CERR << NTEXT("Error initializing service") << std::endl;
        }
    }
   __except(dwErr = GetExceptionCode(), EXCEPTION_EXECUTE_HANDLER)
   {
      if(m_hServiceStatus)
         SetStatus(SERVICE_STOPPED, 0, 0, 0, dwErr, 0);
   }

   DeInit();
   SetStatus(SERVICE_STOPPED, 0, 0, 0, dwErr, 0);
}
开发者ID:CSanchezAustin,项目名称:cslib,代码行数:29,代码来源:CService.cpp

示例5: DeInit

/***************************************************************************//**
* 函数名称:	SetAttribute
* 功能描述:	设置输入输出图片属性以及Scale算法。
* 参    数:	srcFormat	>> 源图像格式;
* 参    数:	dstFormat	>> 目标图像格式;
* 参    数:	enAlogrithm	>> Scale算法;
* 返 回 值:	
* 其它说明:	
* 修改日期		修改人			修改内容
* ------------------------------------------------------------------------------
* 2011-10-28	Cloud	      	创建
*******************************************************************************/
void CFFScale::SetAttribute(PicFormat srcFormat, PicFormat dstFormat, SwsAlogrithm enAlogrithm)
{
	m_srcFormat = srcFormat;
	m_dstFormat = dstFormat;
	m_enAlogrithm = enAlogrithm;
	DeInit();
}
开发者ID:Lamobo,项目名称:Lamobo-D1,代码行数:19,代码来源:FFScale.cpp

示例6: SetCurrentOperation

VError DB4DJournalParser::SetEndOfJournal( uLONG8 inOperation )
{
	VError error = VE_OK;
	if ( fFileStream )
	{
		CDB4DJournalData *journalData = NULL;
		error = SetCurrentOperation( inOperation, &journalData );
		if ( journalData )
			journalData->Release();
		if ( error == VE_OK )
		{
			sLONG8 filePos = fFileStream->GetPos();
			error = DeInit();
			if ( error == VE_OK )
			{
				VFileDesc *fileDesc = NULL;
				error = fLogFile->Open( FA_READ_WRITE, &fileDesc );
				if ( error == VE_OK )
				{
					error = fileDesc->SetSize( filePos );
					delete fileDesc;
				}
				if ( error == VE_OK )
					fTotalOperationCount = fCurrentOperation;
			}
		}
	}
	else
	{
		error = VE_UNIMPLEMENTED; // not initialized
	}
	return error;
}
开发者ID:sanyaade-iot,项目名称:core-Components,代码行数:33,代码来源:journal_parser.cpp

示例7: MainLoop

WPARAM MainLoop()
{
	MSG msg;

	while(1)											// Do our infinate loop
	{													// Check if there was a message
		if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) 
        { 
			if(msg.message == WM_QUIT)					// If the message wasnt to quit
				break;
            TranslateMessage(&msg);						// Find out what the message does
            DispatchMessage(&msg);						// Execute the message
        }
		else											// if there wasn't a message
		{ 

/////// * /////////// * /////////// * NEW * /////// * /////////// * /////////// *
			g_Camera.Update();							// Update the camera data			
/////// * /////////// * /////////// * NEW * /////// * /////////// * /////////// *

			RenderScene();								// Update the screen every frame (Not good in a game)
        } 
	}

	DeInit();											// Clean up and free all allocated memory

	return(msg.wParam);									// Return from the program
}
开发者ID:twinklingstar20,项目名称:Programming-Tutorials,代码行数:28,代码来源:Main.cpp

示例8: WndProc

// Here is the WndProc that handles all the messages															
LRESULT CALLBACK WndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
	// Check which message was passed in
    switch (iMsg)											
    {
		// This message is sent when the window is created (CreateWindow())
		case WM_CREATE:

			// Create the double buffer and load the bitmaps	
			Init(hwnd);										
			break;	
	
		case WM_RBUTTONDOWN:
			// By pressing the right mouse button you can switch animations
			SetSpriteState(&gMonster, ++gMonster.state % 4);
			break;

		// This message is sent when the window is destroyed
		case WM_DESTROY:									

			// Free all the data and set everything back to normal, then post the quit message
			DeInit();										
			break;				
	}													

	// Process/handle the default messages
	return DefWindowProc (hwnd, iMsg, wParam, lParam);		
															
}
开发者ID:Allenjonesing,项目名称:tutorials,代码行数:30,代码来源:Main.cpp

示例9: MainLoop

WPARAM MainLoop()
{
    MSG msg;

    while(1)											// Do our infinite loop
    {
        // Check if there was a message
        if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
        {
            if(msg.message == WM_QUIT)					// If the message wasn't to quit
                break;
            TranslateMessage(&msg);						// Find out what the message does
            DispatchMessage(&msg);						// Execute the message
        }
        else											// If there wasn't a message
        {
            if(AnimateNextFrame(60))					// Make sure we only render 60 frames per second
            {
                RenderScene();							// Render the scene
            }
        }
    }

    DeInit();											// Clean up and free all allocated memory

    return(msg.wParam);									// Return from the program
}
开发者ID:jiangguang5201314,项目名称:ZNginx,代码行数:27,代码来源:Main.cpp

示例10: OBJECTTEMPLATE

CMeshObject::CMeshObject(IHashString *parentName, IHashString *name) : 
	OBJECTTEMPLATE( CRenderManager, CMeshObject, IMeshObject, parentName, name )
{
	//Not sure if we want to add to hierarchy
	//AddToHierarchy();
	DeInit();
}
开发者ID:klhurley,项目名称:ElementalEngine2,代码行数:7,代码来源:CMeshObject.cpp

示例11: AfxEnableControlContainer

BOOL CYTGetApp::InitInstance()
{
	AfxEnableControlContainer();

	// Standard initialization
	// If you are not using these features and wish to reduce the size
	//  of your final executable, you should remove from the following
	//  the specific initialization routines you do not need.

#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif
	Init();

	CMainDlg dlg;
	m_pMainWnd = &dlg;
	int nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with OK
	}
	else if (nResponse == IDCANCEL)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with Cancel
	}
	DeInit();
	// Since the dialog has been closed, return FALSE so that we exit the
	//  application, rather than start the application's message pump.
	return FALSE;
}
开发者ID:killbug2004,项目名称:cosps,代码行数:34,代码来源:YTGet.cpp

示例12: MainLoop

WPARAM MainLoop()
{
	MSG msg;

	while(1)											// Do our infinite loop
	{													// Check if there was a message
		if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) 
		{ 
			if(msg.message == WM_QUIT)					// If the message wasn't to quit
				break;
			TranslateMessage(&msg);						// Find out what the message does
			DispatchMessage(&msg);						// Execute the message
		}
		else											// if there wasn't a message
		{ 		
			if(AnimateNextFrame(60))					// Make sure we only animate 60 FPS
			{
				g_Camera.Update();						// Update the camera information
				RenderScene();							// Render the scene every frame
			}
			else
			{
				Sleep(1);								// Let other processes work
			}
		} 
	}

	DeInit();											// Clean up and free all allocated memory

	return(msg.wParam);									// Return from the program
}
开发者ID:88er,项目名称:tutorials,代码行数:31,代码来源:Main.cpp

示例13: MainLoop

WPARAM MainLoop()
{
	MSG msg;

	// This is where we load our accelerators for keyboard shortcuts
	HACCEL hAccelTable = LoadAccelerators(g_hInstance, MAKEINTRESOURCE(IDR_ACCELERATOR1));

	while(1)											// Do our infinite loop
	{													// Check if there was a message
		if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) 
        { 
			if(msg.message == WM_QUIT)					// If the message wasn't to quit
				break;

			// Check if there was keyboard command - if not, process messages like normal
			if(!TranslateAccelerator(g_hWnd, hAccelTable, &msg))
			{
				TranslateMessage(&msg);					// Find out what the message does
				DispatchMessage(&msg);					// Execute the message
			}

			RenderScene();								// Since no animation, only render when the user does something
        } 
	}
	
	DeInit();											// Clean up and free all allocated memory

	return(msg.wParam);									// Return from the program
}
开发者ID:Allenjonesing,项目名称:tutorials,代码行数:29,代码来源:Main.cpp

示例14: DeInit

void Replay::Init(bool rec)
{
  DeInit();

  is_recorder = rec;
  replay_state = (rec) ? PAUSED_RECORD : PAUSED_PLAY;
}
开发者ID:fluxer,项目名称:warmux,代码行数:7,代码来源:replay.cpp

示例15: MainLoop

WPARAM MainLoop()
{
	MSG msg;

	while(1)											// Do our infinite loop
	{													// Check if there was a message
		if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) 
        { 
			if(msg.message == WM_QUIT)					// If the message wasn't to quit
				break;
            TranslateMessage(&msg);						// Find out what the message does
            DispatchMessage(&msg);						// Execute the message
        }
		else											// if there wasn't a message
		{ 
			// Render the scene every frame to update the rotating cube
			RenderScene();								
       } 
	}

	DestroyFont();										// This frees up our font display list									
	DeInit();											// Release memory and restore settings

	return(msg.wParam);									// Return from the program
}
开发者ID:Allenjonesing,项目名称:tutorials,代码行数:25,代码来源:Main.cpp


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