Patent ID: 8683462

Claim:
A method comprising: determining, via a managed code environment executing on a computing device, an extension that corresponds with a hardware platform of the computing device; loading, via the managed code environment, code of the extension that corresponds with the hardware platform into a first domain, the extension configured to expose hardware-based services of the hardware platform; loading, via the managed code environment operating on the computing device, code of an application into a second domain, the first domain being different than the second domain; receiving, from the application and through an application program interface (API) of the managed code environment, a call to a function of native program code corresponding to the hardware platform, the API accessible from both the first domain and the second domain; determining whether the call from the application is received via the first domain or via the second domain; and allowing the call through the API if the call is received from the application via the first domain effective to allow the application to access one of the hardware-based services of the hardware platform; or disallowing the call through the API if the call is received from the application via the second domain effective to prevent the application from accessing the hardware-based services of the hardware platform.