ipc - Windows URL scheme call to running program -
i want trigger event in running application , deliver arguments call of url scheme in windows 10. made following registry entry:
hkey_classes_root alert (default) = "url:alert protocol" url protocol = "" defaulticon (default) = "alert.exe,1" shell open command (default) = "c:\program files\alert\alert.exe" "%1"
obviously, starts new instance of application argument, when calling 'alert:arg1'. want windows call running instance.
with mac, call of url scheme triggers event, can catch. exactly, want. this, added following part alert.app/contents/info.plist:
<array> <dict> <key>cfbundleurlname</key> <string>alert</string> <key>cfbundleurlschemes</key> <array> <string>alert</string> </array> </dict> </array>
so how realise on windows? i'm programming application in xojo object-oriented basic, i'll happy general solution.
well, after reading answer of alex, searched how realise code , found explained , working solution brad smith written in c#.
the registry entry above can stay is, program needs:
- a service class (which exposed application instance
via .net remoting)- a modified entry point (which either communicate service , terminate, or start application normally)
read article , @ code further explanation.
Comments
Post a Comment