Merge pull request #3749 from love-code-yeyixiao/RemoteControl

Remote control
This commit is contained in:
DavidXanatos 2024-03-24 13:01:49 +01:00 committed by GitHub
commit 8194614afe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 51 additions and 1 deletions

View File

@ -95,7 +95,7 @@ _FX BOOLEAN Gui_InitTitle(HMODULE module)
// hook functions
//
if (! Gui_DisableTitle||SbieApi_QueryConfBool(NULL,"NoTitle",FALSE)) {
if (! Gui_DisableTitle) {
SBIEDLL_HOOK_GUI(GetWindowTextW);
SBIEDLL_HOOK_GUI(GetWindowTextA);

View File

@ -0,0 +1,50 @@
#pragma once
struct RemoteConfigChanging
{
char* m_Name;
char* setting;
char* value;
bool bDelete;
bool bSuccess;
}*PRemoteConfigChanging;
class CRemoteCtrlUtil
{
protected:
CRemoteCtrlServer* Servers;
public:
CRemoteCtrlUtil(CRemoteCtrlServer[]);
~CRemoteCtrlUtil();
static bool CheckControlList(CRemoteCtrlServer* server, int);
bool GetChangingRequest(RemoteConfigChanging* conf);
bool GetOperationRequest();
bool GetEncryptKey(char* ID, char* BoxName, char* QueryServer, char* outKey);
};
class CRemoteCtrlServer
{
protected:
char* ServerName, ServerAddress;
unsigned int pPort;
int pPriority;
public:
CRemoteCtrlServer(char* lpName, char* lpIP4, unsigned int pPort = 0, int pPriority = 1);
const char* GetServerName();
const char* GetServerAddress();
int GetPriority();
~CRemoteCtrlServer();
};
class CRemoteCtrlSocket {
protected:
CRemoteCtrlServer Server;
public:
CRemoteCtrlSocket(CRemoteCtrlServer server);
~CRemoteCtrlSocket();
virtual int ConnectTo();
virtual int DisConnect();
virtual int AbortConnect();
virtual int send(const char* buf);
virtual int recv(char** buf);
virtual int SwitchServer();
};