.NET Framework tried that with their whole "security" system, but it was a massive failure.

The only fool-proof solution is separate address spaces and OS cooperation.