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

正文內(nèi)容

本科停車場(chǎng)管理系統(tǒng)畢業(yè)論文(文件)

 

【正文】 d = 0。portm_csCommunicationSync)。 LeaveCriticalSection(amp。portm_csCommunicationSync)。portm_ov)。 } default: { // Another error has occured. Process this error. portProcessErrorMessage(ReadFile())。 bResult = GetOverlappedResult(portm_hComm, // Handle to COMM port amp。 } } // close if (!bRead) LeaveCriticalSection(amp。 // Set the status variable in the dialog class to // TRUE to indicate the thread is running. portm_bThreadAlive = TRUE。 DWORD dwError = 0。 // begin forever loop. This loop will run as long as the thread is alive. for (。 if (!bResult) { // If WaitCommEvent() returns FALSE, process the last error to determin // the reason.. switch (dwError = GetLastError()) { case ERROR_IO_PENDING: { // This is a normal return value if there are no bytes // to read at the port. // Do nothing and continue 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。 } // 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)。 } case 1: // read event { GetCommMask(portm_hComm, amp。 if (CommEvent amp。 if (CommEvent amp。 if (CommEvent amp。 break。下面介紹在本系統(tǒng)中實(shí)現(xiàn)視頻功能的類CAviCap。 HWND m_hWndCap。//*******************************************************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è)置錯(cuò)誤處理函數(shù) capSetCallbackOnError(m_hWndCap, CAviCap::ErrorCallbackProc)。 CString str = appExtractFilePath()。//判斷如果保存圖像不成功,那么就直接返回。 } HANDLE hFile = CreateFile(str,GENERIC_READ, 0/*FILE_SHARE_READ |FILE_SHARE_WRITE*/,NULL, //讀寫共享 OPEN_EXISTING,0,0)。hsize)。 DWORD nBytesToRead = lsize。 CloseHandle(hFile)。 //轉(zhuǎn)換2進(jìn)制文件為16進(jìn)制文件 CString csSQL = UPDATE TAB_COUNTTIME SET CAR_IMAGE=0x。 i lsize。 extern const TCHAR HEX[256][2]。 CCountTime rs_CountTime( amp。 reval = ReadFile(hFile,p,nBytesToRead, amp。 DWORD s = GlobalSize(ghandle)。 DWORD hsize。)。 BOOL revalue = capFileSaveDIB(app, (LPCTSTR)str)。}//*******************************************************,并把捕獲的圖像保存到數(shù)據(jù)庫(kù)。 capOverlay (m_hWndCap, TRUE)。// Generated message map functionsprotected:private: //錯(cuò)誤處理函數(shù) static LRESULT CALLBACK ErrorCallbackProc(HWND hWnd, int nErrID,LPSTR lpErrorText)。 BOOL capInit(CWnd* pParentWnd, int tx, int ty, int bx, int by, int avi_WindowID, int DeviceIndex)。}//*******************************************************在前面提到本系統(tǒng)中有對(duì)進(jìn)出車輛進(jìn)行檢查的功能,也就是對(duì)進(jìn)入停車場(chǎng)內(nèi)的車輛全部進(jìn)行拍攝。 break。 if (CommEvent amp。 if (CommEvent amp。 if (CommEvent amp。 // Kill this thread. break is not needed, but makes me feel better. AfxEndThread(100)。stat)。 } default: { // All other error codes indicate a serious error has // occured. Process this error. portProcessErrorMessage(WaitCommEvent())。Event, amp。 BOOL bResult = TRUE。 DWORD Event = 0。 // notify parent that a byte was received ::SendMessage((portm_pOwner)m_hWnd, WM_COMM_RXCHAR, (WPARAM) RXBuff, (LPARAM) portm_nPortNr)。BytesRead, // Stores number of bytes read TRUE)。 } } } else { // ReadFile() returned plete. It is not necessary to call GetOverlappedResults() bRead = TRUE。 bRead = FALSE。RXBuff, // RX Buffer Pointer 1, // Read one byte amp。 // start forever loop. I use this type of loop because I // do not know at runtime how many loops this will have to //
點(diǎn)擊復(fù)制文檔內(nèi)容
物理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1