소스 검색

GetTickCount改为GetTickCount64

Jeff 5 년 전
부모
커밋
b671dfa80f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      TCL Copy Tool/TCL Copy Tool/SerialPort.cpp

+ 2 - 2
TCL Copy Tool/TCL Copy Tool/SerialPort.cpp

@@ -343,13 +343,13 @@ DWORD CSerialPort::Read(void *lpBuf, DWORD dwCount)
 	// 使用ClearCommError来读取缓存区接受到的字节时, 
 	// 可能受系统线程调试或硬件延时, cbInQue为空, 
 	// 这里要用while延时获取;
-	DWORD dwTick = GetTickCount();
+	DWORD dwTick = GetTickCount64();
 	DWORD dwLastLen = 0;
 	//while (ComStat.cbInQue == 0)
 	while(1)
 	{// cbInQue表示输入缓冲区的字节数; 
 		Sleep(150);
-		if (GetTickCount() - dwTick > 5000)
+		if (GetTickCount64() - dwTick > 5000)
 			break;
 		ClearCommError(m_hComm, &dwErrorFlags, &ComStat);
 		if ( ComStat.cbInQue != 0 && dwLastLen == ComStat.cbInQue )