- Code: Select all
HKEY_CLASSES_ROOT
(Default) = "URL:MyApp Protocol"
URL Protocol = ""
DefaultIcon
(Default) = "myapp.exe,1"
shell
open
command
(Default) = "C:\Program Files\MyApp\myapp.exe" -url "%1"
I have a web page with links:
- Code: Select all
<a href="myapp://bbc.co.uk">myapp://bbc.co.uk</a> // 1
<a href="myapp://close">myapp://close</a> // 2
When I click on 1, command line argument -url "bbc.co.uk" is passed to my CEF based application, the application starts up and loads the page fine.
What I would like to achieve is to close the application cleanly when I click on 2.
How can I programmatically terminate a CEF based application cleanly?