使用soui开发的mbc,只支持windows版本
w1146869587
2022-01-24 4905e2e7537d507f218e8e9595485e09d9f3a2b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// mbcsubprocess.cpp : ¶¨ÒåÓ¦ÓóÌÐòµÄÈë¿Úµã¡£
//
 
#include "stdafx.h"
#include "mbsubprocess.h"
#include "client_renderer_app.h"
#include "MiniDumper.h"
 
#if defined(CEF_USE_SANDBOX)
// The cef_sandbox.lib static library is currently built with VS2013. It may not
// link successfully with other VS versions.
#pragma comment(lib, "cef_sandbox.lib")
#endif
 
 
CMiniDumper g_miniDumper(true);
 
int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);
 
    // Enable High-DPI support on Windows 7 or newer.
    CefEnableHighDPISupport();
   
 
    void* sandbox_info = NULL;
 
#if defined(CEF_USE_SANDBOX)
  // Manage the life span of the sandbox information object. This is necessary
  // for sandbox support on Windows. See cef_sandbox_win.h for complete details.
  CefScopedSandboxInfo scoped_sandbox;
  sandbox_info = scoped_sandbox.sandbox_info();
#endif
 
   
  
  // Provide CEF with command-line arguments.
  CefMainArgs main_args(hInstance);
   
  CefRefPtr<RenderProcessClientApp> app(new RenderProcessClientApp()); 
  
  // CEF applications have multiple sub-processes (render, plugin, GPU, etc)
  // that share the same executable. This function checks the command-line and,
  // if this is a sub-process, executes the appropriate logic.
  int exit_code = CefExecuteProcess(main_args, app.get(), sandbox_info);
 
   
  if (exit_code >= 0) {
    // The sub-process has completed so return here.
    return exit_code;
  }
 
  // Specify CEF global settings here.
//  CefSettings settings;
//
//#if !defined(CEF_USE_SANDBOX)
//  settings.no_sandbox = true;
//#endif
 
  // SimpleApp implements application-level callbacks for the browser process.
  // It will create the first browser instance in OnContextInitialized() after
  // CEF has initialized.
 
 
  // Initialize CEF.
  //CefInitialize(main_args, settings, app.get(), sandbox_info);
 
  //// Run the CEF message loop. This will block until CefQuitMessageLoop() is
  //// called.
  //CefRunMessageLoop();
 
  //// Shut down CEF.
  //CefShutdown();
 
    // Ö´ÐÐ×Ó½ø³ÌÂß¼­£¬´Ëʱ»á¶ÂÈûÖ±µ½×Ó½ø³ÌÍ˳ö¡£
  return  true;
}