Skip to content

实现微信多开的技术原理描述,提供bin,仅供windows系统原理学习使用

License

Notifications You must be signed in to change notification settings

Shilyx/MultiWeChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MultiWeChat

实现微信多开的技术原理描述,提供bin,仅供windows系统原理学习使用 知乎回答链接

在启动微信之前运行本程序,即可实现后续微信的任意多开

本程序运行后无界面,不需要多次运行

核心代码都在WeChat.h中:

static void EnableMultiWeChat()
{
    HANDLE hMutex = CreateMutexW(NULL, FALSE, L"_WeChat_App_Instance_Identity_Mutex_Name");
    SID_IDENTIFIER_AUTHORITY SIDAuthWorld = SECURITY_WORLD_SID_AUTHORITY;
    PSID pEveryoneSID = NULL; // everyone
    char szBuffer[4096];
    PACL pAcl = (PACL)szBuffer;

    AllocateAndInitializeSid(
        &SIDAuthWorld,
        1,
        SECURITY_WORLD_RID,
        0, 0, 0, 0, 0, 0, 0,
        &pEveryoneSID);

    InitializeAcl(pAcl, sizeof(szBuffer), ACL_REVISION);
    AddAccessDeniedAce(pAcl, ACL_REVISION, MUTEX_ALL_ACCESS, pEveryoneSID);
    SetSecurityInfo(hMutex, SE_KERNEL_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, pAcl, NULL);
}

About

实现微信多开的技术原理描述,提供bin,仅供windows系统原理学习使用

Resources

License

Stars

Watchers

Forks

Packages

No packages published