淘客熙熙

主题:【原创】Delphi,亡羊补牢奈若何? -- 晨池

共:💬86 🌺84 新:
全看分页树展 · 主题 跟帖
家园 8年了,别提它了。

Delphi从来没有正式用过,不过Delphi的表亲倒是用过8年,它的表亲就是C++ Builder。

DELPHI(vcl)的思路和MFC截然不同,变个带GUI的小程序自然是很容易上手,比MFC容易多了,开发效率也高多了。不过俺写的代码以服务器和协议方面的居多,用BUILDER或者VS差别不大。不过代码复杂的话,带折叠功能的编辑器还是很好的。

这两天玩CHROME的代码把VS 2008搬了出来。虽然在文档上讲用VS 2005,但在VS 2008上基本没有问题。

贴一小段Chrome进程初始化的代码。

bool single_process =

parsed_command_line.HasSwitch(switches::kSingleProcess);

if (single_process)

RenderProcessHost::set_run_renderer_in_process(true);

bool icu_result = icu_util::Initialize();

CHECK(icu_result);

logging::OldFileDeletionState file_state =

logging::APPEND_TO_OLD_LOG_FILE;

if (process_type.empty()) {

file_state = logging::DELETE_OLD_LOG_FILE;

}

logging::InitChromeLogging(parsed_command_line, file_state);

#ifdef NDEBUG

if (parsed_command_line.HasSwitch(switches::kSilentDumpOnDCHECK) &&

parsed_command_line.HasSwitch(switches::kEnableDCHECK)) {

logging::SetLogAssertHandler(ChromeAssert);

}

#endif // NDEBUG

if (!process_type.empty()) {

// Initialize ResourceBundle which handles files loaded from external

// sources. The language should have been passed in to us from the

// browser process as a command line flag.

ResourceBundle::InitSharedInstance(std::wstring());

}

// Eviction of injected DLLs is done early enough that it is likely

// to only cover DLLs injected by means of appInit_dlls registry key.

if (do_dll_eviction)

EvictTroublesomeDlls();

startup_timer.Stop(); // End of Startup Time Measurement.

int rv;

if (process_type == switches::kRendererProcess) {

rv = RendererMain(parsed_command_line, show_command, target_services);

} else if (process_type == switches::kPluginProcess) {

rv = PluginMain(parsed_command_line, show_command, target_services);

} else if (process_type.empty()) {

int ole_result = OleInitialize(NULL);

DCHECK(ole_result == S_OK);

rv = BrowserMain(parsed_command_line, show_command, broker_services);

OleUninitialize();

}

全看分页树展 · 主题 跟帖


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河