##事件名称
> KiApp::OnBeforeCommandLineProcessing
* * * * *
> *继承自: CefApp::OnBeforeCommandLineProcessing()*
## 简要释义:
> 在应用程序启动之后,将会获得一次调整进程命令行参数的机会。
* * * * *
## 原文注释:
> Provides an opportunity to view and/or modify command-line arguments before processing by CEF and Chromium. The |process_type| value will be empty for the browser process. Do not keep a reference to the CefCommandLine object passed to this method. The CefSettings.command_line_args_disabled value can be used to start with an emptycommand-line object. Any values specified in CefSettings that equate to command-line arguments will be set before this method is called. Be cautious when using this method to modify command-line arguments for non-browser processes as this may result in undefined behavior including crashes.
## 参数列表
.版本 2
.参数 进程类型, 文本型, , 当前读取命令行参数的进程类型,空为Browser进程
.参数 启动参数, KiCommandLine, , 提供给进程的启动参数,可以修改。
## 函数图示
![](https://box.kancloud.cn/2016-06-02_574fc4fc0f4e8.jpg)
## 实例应用
![](https://box.kancloud.cn/2016-06-02_574fc4fc32b51.jpg)
## 代码
.版本 2
.局部变量 flash, tki_system_pepper_flash
flash = KiGetFlashPlayerVer () ' 取出系统flash插件信息
.如果真 (flash.version ≠ “”)
启动参数.AppendSwitchWithValue (“ppapi-flash-path”, flash.path) ' 给新进程添加上加载flash插件的启动参数
启动参数.AppendSwitchWithValue (“ppapi-flash-version”, flash.version)
.如果真结束
启动参数.AppendSwitch (“process-per-site”) ' 但单浏览器单进程
- 常见问题
- 无法播放flash?
- 如何安装框架向导程序?
- 如何建立CEF3应用程序?
- 应用程序事件
- OnBeforeCommandLineProcessing
- OnRegisterCustomSchemes
- GetLocalizedString
- GetDataResource
- GetDataResourceForScale
- OnContextInitialized
- OnBeforeChildProcessLaunch
- OnRenderProcessThreadCreated
- OnRenderThreadCreated
- OnWebKitInitialized
- OnBrowserCreated
- OnBrowserDestroyed
- OnBeforeNavigation
- OnContextCreated
- OnContextReleased
- OnUncaughtException
- OnFocusedNodeChanged
- OnProcessMessageReceived
- 浏览器事件
- OnBeforeContextMenu
- RunContextMenu
- OnContextMenuCommand
- OnContextMenuDismissed
- OnFileDialog
- OnAddressChange
- OnTitleChange
- OnFaviconURLChange
- OnFullscreenModeChange
- OnTooltip
- OnStatusMessage
- OnConsoleMessage
- OnBeforeDownload
- OnDownloadUpdated
- OnDragEnter
- OnDraggableRegionsChanged
- OnFindResult
- OnTakeFocus
- OnSetFocus
- OnGotFocus
- OnRequestGeolocationPermission
- OnCancelGeolocationPermission
- OnJSDialog
- OnBeforeUnloadDialog
- OnResetDialogState
- OnDialogClosed
- OnPreKeyEvent
- OnKeyEvent
- OnBeforePopup
- OnAfterCreated
- RunModal
- DoClose
- OnBeforeClose
- OnLoadingStateChange
- OnLoadStart
- OnLoadEnd
- OnLoadError
- OnBeforeBrowse
- OnOpenURLFromTab
- OnBeforeResourceLoad
- GetResourceHandler
- OnResourceRedirect
- OnResourceResponse
- GetResourceResponseFilter
- OnResourceLoadComplete
- GetAuthCredentials
- OnQuotaRequest
- OnProtocolExecution
- OnCertificateError
- OnPluginCrashed
- OnRenderViewReady
- OnRenderProcessTerminated
- OnProcessMessageReceived2
- 浏览器对象类
- KiBrowser 类
- GetHost
- CanGoBack
- GoBack
- CanGoForward
- GoForward
- IsLoading
- Reload
- ReloadIgnoreCache
- StopLoad
- GetIdentifier
- IsSame
- IsPopup
- HasDocument
- GetMainFrame
- GetFocusedFrame
- GetFrameIdent
- GetFrameName
- GetFrameCount
- GetFrameIdentifiers
- GetFrameNames
- SendProcessMessage
- KiFrame 类
- KiBrowserHost 类
- KiSchemeRegistrar 类
- KiListValue 类
- KiCommandLine 类
- KiDOMDocument 类
- KiDOMNode 类
- KiValue 类
- KiBinaryValue 类
- KiDictionaryValue 类
- KiPostDataElement 类
- KiRequest 类
- KiPostData 类
- KiStdVector 类
- KiCookieManager 类
- KiStdMap 类
- KiDownloadItem 类
- KiContextMenuParams 类
- KiMenuModel 类
- KiStdMultimap 类
- KiTaskRunner 类
- KiDragData 类
- KiStreamWriter 类
- KiStdRectVector 类
- KiResponse 类
- KiNavigationEntry 类
- KiSSLCertPrincipal 类
- KiSSLInfo 类
- KiProcessMessage 类
- KiPrintSettings 类
- KiStdPageRangeVector 类
- KiRequestContext 类
- KiRenderManager 类
- KiBrowserManager 类
- KiCheatRecord 类
- CWin32App 类
- 浏览器设置类
- KiSettings 类
- KiWindowInfo 类
- KiBrowserSettings 类
- KiPoint 类
- KiRect 类
- KiCookie 类
- KiPopupFeatures 类
- KiPdfPrintSettings 类
- 浏览器回调类
- KiRequestCallback 类
- KiBeforeDownloadCallback 类
- KiDownloadItemCallback 类
- KiRunContextMenuCallback 类
- KiFileDialogCallback 类
- KiRunFileDialogCallback 类
- KiJSDialogCallback 类
- KiGeolocationCallback 类
- KiEndTracingCallback 类
- KiPrintDialogCallback 类
- KiPrintJobCallback 类
- V8引擎
- KiV8Accessor 类
- KiV8Context 类
- KiV8Exception 类
- KiV8StackFrame 类
- KiV8StackTrace 类
- KiV8Value 类
- KiV8Handler 类
- 实战应用相关
- SDK 指令
- KiSetScriptControl
- KiGetFlashPlayerVer
- CEF_REQUIRE_UI_THREAD
- CEF_REQUIRE_IO_THREAD
- CEF_REQUIRE_FILE_THREAD
- CEF_REQUIRE_RENDERER_THREAD
- KiDoMessageLoopWork
- KiExecuteProcess
- KiInitialize
- KiQuitMessageLoop
- KiShutdown
- KiSetOsModalLoop
- KiEnableHighDPISupport
- KiRunMessageLoop
- KiAllocCharToAttach
- KiFreeCharToAttach
- KiCreateBrowser
- KiCreateBrowserSync
- KiCreateCommand
- KiGetGlobalCommand
- KiSetPluginProcess
- KiCreateListValue
- KiCreateValue
- KiCreateBinaryValue
- KiCreateDictionaryValue
- KiPostDataElementCreate
- KiCreateRequest
- KiStdCreateVector
- KiGetGlobalCookieManager
- KiCreateCookieManager
- KiStdCreateMaper
- KiMenuModelRelease
- KiCreatePostData
- KiCreatePostDataElement
- KiCurrentlyOn
- KiRelateControls
- KiTaskGetForCurrentThread
- KiTaskGetForThread
- KiPostTask
- KiPostDelayedTask
- KiGetRefPtr
- KilimitChar
- KiCreateDragData
- KiCloneDragData
- KiCreateResponse
- KiV8CreateAccessor
- KiV8ReleaseAccessor
- KiV8CreateHandler
- KiV8ReleaseHandler
- KiCreateApp
- KiReleaseApp
- KiCreateHandler
- KiReleaseHandler
- KiV8GetCurrentContext
- KiV8GetEnteredContext
- KiV8InContext
- KiV8GetCurrent
- KiV8CreateUndefined
- KiV8CreateNull
- KiV8CreateBool
- KiV8CreateInt
- KiV8CreateUInt
- KiV8CreateDouble
- KiV8CreateDate
- KiV8CreateString
- KiV8CreateObject
- KiV8CreateArray
- KiV8CreateFunction
- KiCreateProcessMessage
- KiCreatePrintSettings
- KiRegisterExtension
- KiV8GetParameterCount
- KiV8GetParameter
- KiV8CreateParameter
- KiV8ClearParameter
- KiV8AddParameter
- KiMoniterSettings
- KiHTMLAddCode
- KiHTMLSelect
- KiHTMLClearAllCode
- KiHTMLAddCrawlImages
- KiHTMLSelCrawlID
- KiHTMLClearAllCrawl
- KiRenderReciveExecuteJavaScript
- KiBrowserReciveExecuteJavaScript
- KiCreateLayoutWindow
- KiWaitLayoutNotifys
- KiCreateBrowserManager
- KiCreateRenderManager
- KiRegisterMessageCallback
- KiCreateCheatRecord
- KiNewWebServer