Solve the problem that QQ cannot run in the sandbox

Source: Internet
Author: User

Many people running QQ in sandboxie may encounter the following problems:

First install QQ in the sand table, then copy the QQ installation folder to another place, clear the sand table, and then start QQ from the sand table:

After Division lookup, it is determined that this problem is caused by the absence of registration of two security components (COM. The dynamic link library files of these two components are ssocommon. dll and ssoplatform. dll installed in the following directories.

C: \ Program Files \ common \ Tencent \ txsso \ version \ bin \

To solve this problem, I wrote a simple QQ starter, put it under the bin directory of QQ, and run it in the sandbox to automatically register the two components, and automatically start QQ. YesCodeAttached to the following is for reference only. compilation requires support for project files.

Click here to download the configured project package (vs2008)

Click here to download the compiledProgram

Note that the current version of txsso is 1.2.1.38. If your QQ version is not the same, replace the two DLL files in the project with the version that comes with your QQ and re-compile it.

# Include <tchar. h> # include <windows. h> # include <atlstr. h> # include <shlobj. h> # include "resource. H "hkey createkey (lpctstr lpkey) {hkey; DWORD dwdisp; regcreatekeyex (HKEY_LOCAL_MACHINE, lpkey, 0, null, encrypt, key_write, null, & hkey, & dwdisp ); return hkey;} void setvalue (hkey, lpctstr lpname, lpctstr lpvalue) {cstring strvalue (lpvalue); If (lpname) {regsetvalueex (hkey, lpname, 0, REG_SZ, (lpbyte) (lpctstr) strvalue, strvalue. getlength () * sizeof (tchar);} else {regsetvalue (hkey, null, REG_SZ, strvalue, strvalue. getlength () ;}void encode (lpctstr lptype, DWORD dwresid, lpctstr lpfilename) {DWORD dwret; hrsrc hresinfo = findresource (null, makeintresource (dwresid), lptype ); hglobal hresmem = loadresource (null, hresinfo); DWORD dwsize = sizeofresource (null, hresinfo); lpvoid lpdata = lockresource (hresmem); handle hdllfile = createfile (lpfilename, generic_write, 0, null, create_always, file_attribute_normal, null); writefile (hdllfile, lpdata, dwsize, & dwret, null); closehandle (hdllfile);} int winapi winmain (hinstance, hinstance hprevinstance, lpstr lpcmdline, int ncmdshow) {cstring strroot, strsubpath, strfile; shgetfolderpath (null, csidl_program_files_common, null, shgfp_type_current, strroot. getbuffer (max_path); strroot. releasebuffer (); strroot + = _ T ("\ Tencent \"); createdirectory (strroot, null); strroot + = _ T ("txsso \\"); createdirectory (strroot, null); strroot + = _ T ("1.2.1.38 \"); createdirectory (strroot, null); strroot + = _ T ("bin \\"); createdirectory (strroot, null); saveresourcefile (_ T ("dllfile"), idr_dll_ssocommon, strroot + _ T ("ssocommon. DLL "); saveresourcefile (_ T (" dllfile "), idr_dll_ssoplatform, strroot + _ T (" ssoplatform. DLL "); hkey = createkey (_ T (" Software \ Tencent \ txsso "); setvalue (hkey, _ T (" version "), _ T ("1.2.1.38"); regclosekey (hkey); hkey = createkey (_ T ("Software \ Classes \ ssoaxctrlforptlogin. ssoforptlogin2 "); setvalue (hkey, null, _ T (" ssoforptlogin2 class "); regclosekey (hkey ); hkey = createkey (_ T ("Software \ Classes \ ssoaxctrlforptlogin. ssoforptlogin2 \ CLSID "); setvalue (hkey, null, _ T (" {EAAED308-7322-4b9b-965E-171933ADD473} "); regclosekey (hkey ); hkey = createkey (_ T ("Software \ Classes \ ssoaxctrlforptlogin. ssoforptlogin2 \ curver "); setvalue (hkey, null, _ T (" ssoaxctrlforptlogin. ssoforptlogin.2 "); regclosekey (hkey); ShellExecute (null, _ T (" open "), _ T (" qq.exe "), null, null, sw_show ); return 0 ;}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.