#include "stdafx.h" #include "USBControlBase.h" using namespace std; CUSBControlSrvBase::CUSBControlSrvBase() { //Start this->m_szModuleName = _T("USBControlBase"); this->m_szServiceName = _T("USBControlBase"); this->m_szSrvDisplayName = _T("USBControlBase"); this->m_szSrvDependencies = _T(""); this->m_szUsbCntlStopEvntName = USB_CNTL_STOP_EVNT_NAME; this->m_hUSBControlStopEvent = NULL; //logger.Init(); //End } CUSBControlSrvBase::~CUSBControlSrvBase() { //Start if(this->m_hUSBControlStopEvent != NULL) { delete this->m_hUSBControlStopEvent; this->m_hUSBControlStopEvent = NULL; } //End } BOOL CUSBControlSrvBase::Init() { //Start //logger.LOG_DBG(L"CUSBControlSrvBase::Init Start"); this->m_hUSBControlStopEvent = new CUSBEvent(); if(this->m_hUSBControlStopEvent == NULL) { //Error } else if(!this->m_hUSBControlStopEvent->CreateWithName(this->m_szUsbCntlStopEvntName,FALSE)) { //ERROR } //logger.LOG_DBG(L"CUSBControlSrvBase::Init End"); return TRUE; //End } BOOL CUSBControlSrvBase::Run() { //Start //logger.LOG_DBG(L"CUSBControlSrvBase::Run Start"); //logger.LOG_DBG(L"CUSBControlSrvBase::Run Start"); return TRUE; //End } //Set Stop Event BOOL CUSBControlSrvBase::SetStopEvent(void) { //Start //logger.LOG_DBG(L"CUSBControlSrvBase::SetStopEvent Start"); if(m_hUSBControlStopEvent != NULL) { if(!m_hUSBControlStopEvent->SetEvent()) { //logger.LOG_DBG(L"m_hUSBControlStopEvent->SetEvent() Failed"); return FALSE; } } //logger.LOG_DBG(L"CUSBControlSrvBase::SetStopEvent Start"); return TRUE; //End }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)