Interview Questions

How do you call unmanaged methods from your .NET code through PInvoke?

.NET Database ,COM interop,and .NET deployment questions and answers


(Continued from previous question...)

How do you call unmanaged methods from your .NET code through PInvoke?

Supply a DllImport attribute. Declare the methods in your .NET code as static extern. Do not implement the methods as they are implemented in your unmanaged code, you’re just providing declarations for method signatures.

(Continued on next question...)

Other Interview Questions