當前位置: 首頁>>代碼示例>>C++>>正文


C++ DeleteCriticalSection函數代碼示例

本文整理匯總了C++中DeleteCriticalSection函數的典型用法代碼示例。如果您正苦於以下問題:C++ DeleteCriticalSection函數的具體用法?C++ DeleteCriticalSection怎麽用?C++ DeleteCriticalSection使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DeleteCriticalSection函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: DeleteCriticalSection

CCritSection::~CCritSection()
{
	DeleteCriticalSection(&m_CS);
}
開發者ID:ddavison,項目名稱:Jaangle,代碼行數:4,代碼來源:ALog.cpp

示例2: Uninitialize

CNdasServiceDeviceEventHandler::~CNdasServiceDeviceEventHandler()
{
	Uninitialize();
	DeleteCriticalSection(&m_DevNotifyMapSection);
}
開發者ID:tigtigtig,項目名稱:ndas4windows,代碼行數:5,代碼來源:ndaspnp.cpp

示例3: pthread_mutex_destroy

int pthread_mutex_destroy(pthread_mutex_t *mutex)
{
	DeleteCriticalSection((_pthread_mutex_t *) mutex);
	return 0;
}
開發者ID:Abyss116,項目名稱:luaplus51-all,代碼行數:5,代碼來源:pt.c

示例4: vlc_mutex_destroy

void vlc_mutex_destroy (vlc_mutex_t *p_mutex)
{
    assert (p_mutex->dynamic);
    DeleteCriticalSection (&p_mutex->mutex);
}
開發者ID:BossKing,項目名稱:vlc,代碼行數:5,代碼來源:thread.c

示例5: DeleteCriticalSection

MutexCS::~MutexCS()
{
    DeleteCriticalSection(&m_criticalSection);
}
開發者ID:Jonnyliu,項目名稱:lochsemu,代碼行數:4,代碼來源:parallel.cpp

示例6: DECLINLINE

DECLINLINE(int) RTCritSectDelete(PCRITICAL_SECTION pCritSect)
{
    DeleteCriticalSection(pCritSect);
    return VINF_SUCCESS;
}
開發者ID:svn2github,項目名稱:virtualbox,代碼行數:5,代碼來源:tstRTCritSect.cpp

示例7: wan


//.........這裏部分代碼省略.........
	
	if ( SetBoolInBlob(hFilterBlob, OWNER_NPP, CATEGORY_CONFIG, TAG_INTERFACE_REALTIME_CAPTURE, TRUE) != NMERR_SUCCESS )
	{
		DestroyBlob( hFilterBlob);
		goto error;
	}

	if ( SetBoolInBlob(hFilterBlob, OWNER_NPP, CATEGORY_LOCATION, TAG_RAS, TRUE) != NMERR_SUCCESS )
	{
		DestroyBlob( hFilterBlob);
		goto error;
	}

	if ( GetNPPBlobTable(hFilterBlob, &pBlobTable) != NMERR_SUCCESS )
	{
		DestroyBlob( hFilterBlob);
		goto error;
	}

	DestroyBlob (hFilterBlob);

	if ( pBlobTable->dwNumBlobs == 0 || pBlobTable->dwNumBlobs > 1)
	{
		///fixme.....
		for ( i = 0 ; i < pBlobTable->dwNumBlobs ; i++ )
			DestroyBlob(pBlobTable->hBlobs[i]);
		
		GlobalFree(pBlobTable);
		goto error;
	}

	pWanAdapter->hCaptureBlob = pBlobTable->hBlobs[0];

	GlobalFree(pBlobTable);

	InitializeCriticalSection(&pWanAdapter->CriticalSection);

	pWanAdapter->hReadEvent = CreateEvent(NULL, TRUE, FALSE, NULL);

	if ( pWanAdapter->hReadEvent == NULL )
		goto error;

#ifdef HAVE_BUGGY_TME_SUPPORT
	pWanAdapter->MemEx.buffer = (PUCHAR)GlobalAlloc(GPTR, DEFAULT_MEM_EX_SIZE);
	if (pWanAdapter->MemEx.buffer == NULL)
		goto error;
	
	pWanAdapter->MemEx.size = DEFAULT_MEM_EX_SIZE;
	pWanAdapter->Tme.active = TME_NONE_ACTIVE;
#endif //HAVE_BUGGY_TME_SUPPORT

	if (CreateNPPInterface(pWanAdapter->hCaptureBlob, IID_IRTC, (void**) &pWanAdapter->pIRTC) == NMERR_SUCCESS && pWanAdapter->pIRTC != NULL) 
	{
		//create OK
		if (pWanAdapter->pIRTC->Connect(pWanAdapter->hCaptureBlob, NULL, WanPacketReceiverCallback, (LPVOID)pWanAdapter , NULL) == NMERR_SUCCESS)
		{
			//connect OK
			if (pWanAdapter->pIRTC->Start() == NMERR_SUCCESS)
			{
				return pWanAdapter;
			}
			else
			{
				pWanAdapter->pIRTC->Disconnect();
				pWanAdapter->pIRTC->Release();
				goto error;
			}
		}
		else
		{
			pWanAdapter->pIRTC->Release();
			goto error;
		}
	}
	else
	{
		goto error;
	}

	//awfully never reached
//	return NULL;

error:

	if (pWanAdapter != NULL)
	{
		if (pWanAdapter->hReadEvent != NULL)
			CloseHandle(pWanAdapter->hReadEvent);

		DeleteCriticalSection(&pWanAdapter->CriticalSection);
		if (pWanAdapter->hCaptureBlob)
			DestroyBlob(pWanAdapter->hCaptureBlob);

		GlobalFree(pWanAdapter);
	}

	CoUninitialize();
	
	return NULL;
}
開發者ID:OPEXGroup,項目名稱:winpcap,代碼行數:101,代碼來源:WanPacket.cpp

示例8: DeleteCriticalSection

MutexImpl::~MutexImpl()
{
	DeleteCriticalSection(&_cs);
}
開發者ID:Bing4Autodesk,項目名稱:CEF3,代碼行數:4,代碼來源:Mutex_WIN32.cpp

示例9: DeleteCriticalSection

CriticalSection::~CriticalSection() noexcept        { DeleteCriticalSection ((CRITICAL_SECTION*) lock); }
開發者ID:Ixox,項目名稱:preenfm2Controller,代碼行數:1,代碼來源:juce_win32_Threads.cpp

示例10: DeleteCriticalSection

CVideoProcessor::~CVideoProcessor()
{
	DeleteCriticalSection(&m_csLock);
}
開發者ID:jscr93,項目名稱:PDI2015B,代碼行數:4,代碼來源:VideoProcessor.cpp

示例11: DeleteCriticalSection

 _PPLXIMP critical_section_impl::~critical_section_impl()
 {
     DeleteCriticalSection(reinterpret_cast<LPCRITICAL_SECTION>(&_M_impl));
 }
開發者ID:EvanCui,項目名稱:cpprestsdk,代碼行數:4,代碼來源:pplxwin.cpp

示例12: Clear

 ~AbortCookieManager() {
     Clear();
     DeleteCriticalSection(&cookieAccess);
 }
開發者ID:codepongo,項目名稱:sumatrapdf,代碼行數:4,代碼來源:Print.cpp

示例13: FreeData

Player::~Player()
{
	FreeData();
	DeleteCriticalSection(&cs);
}
開發者ID:BackupTheBerlios,項目名稱:mgoodies-svn,代碼行數:5,代碼來源:player.cpp

示例14: CloseDevice

//關閉線程,釋放資源
CWavePlay::~CWavePlay(void)
{
	CloseDevice();
	DeleteCriticalSection(&_waveCriticalSection);
}
開發者ID:mildrock,項目名稱:Media,代碼行數:6,代碼來源:WavePlay.cpp

示例15: VisualCppMutexDestroy

static void VisualCppMutexDestroy(PlatformSpecificMutex mutex)
{
	CRITICAL_SECTION *critical_section = (CRITICAL_SECTION*)mutex;
	DeleteCriticalSection(critical_section);
	delete critical_section;
}
開發者ID:Andne,項目名稱:cpputest,代碼行數:6,代碼來源:UtestPlatform.cpp


注:本文中的DeleteCriticalSection函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。