This is a pretty basic example to use the ApplicationServices framework from C in MacOS.