I follow an example from SO answer how to run QTP script from C#. However during Application object creation I get UnauthorizedAccessException. Any clues what might be wrong? Here is a screenshot of the exception and the source code.

I follow an example from SO answer how to run QTP script from C#. However during Application object creation I get UnauthorizedAccessException. Any clues what might be wrong? Here is a screenshot of the exception and the source code.

If you're on Windows 7 or Vista, have a go at starting your development area as Administrator, chances are you're getting an Access Violation.
Quoting the OP of the original post you refer to:
This code did work. However, for QTP version 10.0, I had to change using QTObjectModelLib; to using QuickTest;.
Might help if you are also using version 10.0.