With C#, we live in a comfortable managed world where everything is controlled by CLR. But sometimes, whether we like it or not, we have to work with 'unmanaged' objects, for example when we want to use some third-party DLL, a COM component, or a resource required for interoperability with the opera…