コード例 #1
0
void CNewFilesBox::Clear(void)
{
	m_OutFiles = m_ExitCode = 0;
	m_Checker.Clear();
	delete m_Proc;
	m_Proc = NULL;
	PurgeQueue();
	gtk_label_set_text(GTK_LABEL(m_Line1), "");
	gtk_label_set_text(GTK_LABEL(m_Line2), "");
}
コード例 #2
0
CFileObject::~CFileObject()
{
    //
    // The object is bound to the file handle and so this happens after close and the 
    // framework guarentees all requests on the file handle are cancelled prior to close
    //
    EnterCriticalSection(&m_RoleLock);
    NT_ASSERT(m_Request == nullptr);
    LeaveCriticalSection(&m_RoleLock);

    PurgeQueue();

    SAFE_DELETEARRAY(m_pszType);
    SAFE_DELETE(m_pConnection);

    DeleteCriticalSection(&m_RoleLock);

    m_FileObject = nullptr;
}
コード例 #3
0
//
// Destructor
//
CNewFilesBox::~CNewFilesBox(void)
{
	g_mutex_lock(m_DataMutex);
	if (m_Thread) {
		m_StopThread = true;
		g_cond_signal(m_Cond);
		g_mutex_unlock(m_DataMutex);
		gdk_threads_unlock();
		g_thread_join(m_Thread);
		gdk_threads_lock();
		g_mutex_lock(m_DataMutex);
		m_Thread = NULL;
	}
	g_mutex_unlock(m_DataMutex);
	delete m_Proc;
	delete m_Con;
	PurgeQueue();
	g_async_queue_unref(m_Queue);
	g_mutex_free(m_DataMutex);
	g_cond_free(m_Cond);
}
コード例 #4
0
NTSTATUS CFileObject::Disable()
{
    MethodEntry("void");
    
    NTSTATUS Status = STATUS_SUCCESS;

    EnterCriticalSection(&m_RoleLock);

    NT_ASSERT(IsPublication() || IsSubscription());

    if (!m_fEnabled) {
        Status = STATUS_INVALID_DEVICE_STATE;
        goto Exit;
    }

    m_fEnabled = FALSE;
    CompleteRequest(STATUS_CANCELLED, 0, true);
    PurgeQueue();

Exit:
    LeaveCriticalSection(&m_RoleLock);
    MethodReturn(Status, "Status = %!STATUS!", Status);
}