|
通过支持AT指令集的手机发送短消息(源代码)(11) InterlockedIncrement( &m_dwSMNumberInPool ); if( m_hWnd != NULL ) ::SendMessage( m_hWnd, PHONE_SMS_RECV, 0, 0 ); } else { if( m_hWnd != NULL ) ::SendMessage( m_hWnd, PHONE_SMS_RECV_BUF_OVERFLOW, 0, 0 ); } } } } } else if( strstr( szBuffer, "AT+" ) != NULL ) { DWORD dwWaitRet = WaitForMultipleObjects( m_dwThreadPoolNum + 1, m_phDPIDLE, FALSE, 1000 ); if( dwWaitRet == WAIT_OBJECT_0 + m_dwThreadPoolNum ) break; if( dwWaitRet != WAIT_TIMEOUT ) { m_pDPool[dwWaitRet].pData = new char[dwReadRet]; CopyMemory( m_pDPool[dwWaitRet].pData, szBuffer, dwReadRet ); m_pDPool[dwWaitRet].dwSize = dwReadRet; SetEvent( m_pDPool[dwWaitRet].hDPDeliver ); } } } } catch( ... ) { break; } if( WaitForSingleObject( m_hSystemExit, 0 ) != WAIT_TIMEOUT ) return; } } bool CGSMPhone::NumberDecode(char *szNumber, int len) { if( len == 0 szNumber == NULL ) return( false ); char c; for( int n = 0; n < len; n += 2 ) { c = szNumber[n];
|