The System.AccessViolationException error occurs when you try to access memory that is not allocated or that you do not have permission to access. In your code, you are trying to allocate a library...