freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

計算機本科畢業(yè)論文(停車場管理系統(tǒng))-資料下載頁

2025-06-22 15:25本頁面
  

【正文】 t the port. // Do nothing and continue break。 } case 87: { // Under Windows NT, this value is returned for some reason. // I have not investigated why, but it is also a valid reply // Also do nothing and continue. break。 } default: { // All other error codes indicate a serious error has // occured. Process this error. portProcessErrorMessage(WaitCommEvent())。 break。 } } } else { // If WaitCommEvent() returns TRUE, check to be sure there are // actually bytes in the buffer to read. // // If you are reading more than one byte at a time from the buffer // (which this program does not do) you will have the situation occur // where the first byte to arrive will cause the WaitForMultipleObjects() // function to stop waiting. The WaitForMultipleObjects() function // resets the event handle in to the nonsignelead state // as it returns. // // If in the time between the reset of this event and the call to // ReadFile() more bytes arrive, the handle will be set again // to the signeled state. When the call to ReadFile() occurs, it will // read all of the bytes from the buffer, and the program will // loop back around to WaitCommEvent(). // // At this point you will be in the situation where is set, // but there are no bytes available to read. If you proceed and call // ReadFile(), it will return immediatly due to the async port setup, but // GetOverlappedResults() will not return until the next character arrives. // // It is not desirable for the GetOverlappedResults() function to be in // this state. The thread shutdown event (event 0) and the WriteFile() // event (Event2) will not work if the thread is blocked by GetOverlappedResults(). // // The solution to this is to check the buffer with a call to ClearCommError(). // This call will reset the event handle, and if there are no bytes to read // we can loop back through WaitCommEvent() again, then proceed. // If there are really bytes to read, do nothing and proceed. bResult = ClearCommError(portm_hComm, amp。dwError, amp。stat)。 if ( == 0) continue。 } // end if bResult // Main wait function. This function will normally block the thread // until one of nine events occur that require action. Event = WaitForMultipleObjects(3, portm_hEventArray, FALSE, INFINITE)。 switch (Event) { case 0: { // Shutdown event. This is event zero so it will be // the higest priority and be serviced first. portm_bThreadAlive = FALSE。 // Kill this thread. break is not needed, but makes me feel better. AfxEndThread(100)。 break。 } case 1: // read event { GetCommMask(portm_hComm, amp。CommEvent)。 if (CommEvent amp。 EV_CTS) ::SendMessage(portm_pOwnerm_hWnd, WM_COMM_CTS_DETECTED, (WPARAM) 0, (LPARAM) portm_nPortNr)。 if (CommEvent amp。 EV_RXFLAG) ::SendMessage(portm_pOwnerm_hWnd, WM_COMM_RXFLAG_DETECTED, (WPARAM) 0, (LPARAM) portm_nPortNr)。 if (CommEvent amp。 EV_BREAK) ::SendMessage(portm_pOwnerm_hWnd, WM_COMM_BREAK_DETECTED, (WPARAM) 0, (LPARAM) portm_nPortNr)。 if (CommEvent amp。 EV_ERR) ::SendMessage(portm_pOwnerm_hWnd, WM_COMM_ERR_DETECTED, (WPARAM) 0, (LPARAM) portm_nPortNr)。 if (CommEvent amp。 EV_RING) ::SendMessage(portm_pOwnerm_hWnd, WM_COMM_RING_DETECTED, (WPARAM) 0, (LPARAM) portm_nPortNr)。 if (CommEvent amp。 EV_RXCHAR) // Receive character event from port. ReceiveChar(port, stat)。 break。 } case 2: // write event { // Write character event from port WriteChar(port)。 break。 } } // end switch } // close forever loop return 0。}//*******************************************************在前面提到本系統(tǒng)中有對進出車輛進行檢查的功能,也就是對進入停車場內(nèi)的車輛全部進行拍攝。在這些車輛駛出的時候系統(tǒng)會自動從數(shù)據(jù)庫中取出它們進門時的圖像,管理員進行對比以確定進入和駛出為同一車輛。下面介紹在本系統(tǒng)中實現(xiàn)視頻功能的類CAviCap。【代碼示例】CAviCap類定義(實現(xiàn)視頻功能的類)//*******************************************************//class CAviCap{// Constructionpublic: CAviCap()。 BOOL capInit(CWnd* pParentWnd, int tx, int ty, int bx, int by, int avi_WindowID, int DeviceIndex)。 void capClose()。 HWND m_hWndCap。// Attributespublic:// Operationspublic:// Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(AviCap) //}}AFX_VIRTUAL// Implementationpublic: virtual ~CAviCap()。// Generated message map functionsprotected:private: //錯誤處理函數(shù) static LRESULT CALLBACK ErrorCallbackProc(HWND hWnd, int nErrID,LPSTR lpErrorText)。}。//*******************************************************1初始化【代碼示例】CAviCap類的使用//*******************************************************//BOOL CAviCap::capInit(CWnd* pParentWnd, int tx, int ty, int bx, int by, int avi_WindowID, int DeviceIndex){ //創(chuàng)建視頻窗口 m_hWndCap = capCreateCaptureWindow((LPSTR)Capture Window, WS_CHILD|WS_VISIBLE, tx,ty,bx,by, pParentWndGetSafeHwnd(), avi_WindowID)。 //連接視頻設(shè)備 capDriverConnect(m_hWndCap, DeviceIndex)。 capOverlay (m_hWndCap, TRUE)。 if (m_hWndCap == NULL) return FALSE。 //設(shè)置錯誤處理函數(shù) capSetCallbackOnError(m_hWndCap, CAviCap::ErrorCallbackProc)。 return TRUE。}//*******************************************************,并把捕獲的圖像保存到數(shù)據(jù)庫?!敬a示例】CAviCap類的使用//*******************************************************void CParkSysView::OnGrabimage(CString strCardID){ CParkSysApp* app = (CParkSysApp *)AfxGetApp()。 CString str = appExtractFilePath()。 str += 。 BOOL revalue = capFileSaveDIB(app, (LPCTSTR)str)。 UpdateWindow()。//判斷如果保存圖像不成功,那么就直接返回。 if (!revalue) { AfxMessageBox(保存圖像失敗,程序還將繼續(xù),但是,在此車出門的時候您不能進行比對。)。 return。 } HANDLE hFile = CreateFile(str,GENERIC_READ, 0/*FILE_SHARE_READ |FILE_SHARE_WRITE*/,NULL, //讀寫共享 OPEN_EXISTING,0,0)。 ASSERT(hFile != INVALID_HANDLE_VALUE)。 DWORD hsize。 DWORD lsize = GetFileSize(hFile, amp。hsize)。 HGLOBAL ghandle = GlobalAlloc(GMEM_MOVEABLE, lsize)。 DWORD s = GlobalSize(ghandle)。 void* p = GlobalLock(ghandle)。 DWORD nBytesToRead = lsize。 BOOL reval = TRUE。 reval = ReadFile(hFile,p,nBytesToRead, amp。nBytesToRead, NULL)。 CloseHandle(hFile)。 CLongBinary image。 CCountTime rs_CountTime( amp。appdatabase )。 //轉(zhuǎn)換2進制文件為16進制文件 CString csSQL = UPDATE TAB_COUNTTIME SET CAR_IMAGE=0x。 LPTSTR szTemp = new TCHAR[ lsize*2 + 1 ]。 extern const TCHAR HEX[256][2]。 for (DWORD i = 0。 i lsize。 i++) { * (szTemp +
點擊復(fù)制文檔內(nèi)容
電大資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1