Platform Invoke (P/Invoke) 

P/Invoke allows us to access structures and functions of unmanaged libraries from our managed code ASP.NET Core 2.0. To use P/Invoke API, we use the System.Runtime.InteropServices namespace. This namespace allows us to access attributes the way we want, to use them with native components. The DllImport attribute is used for the declaration.

If you want to dig more into the details, online resources are available at: http://www.pinvoke.net . It has all the functions which are widely used.
For example: AllowSetForegroundWindow (user32)—this enables the mentioned process to set the foreground window by utilizing the SetForegroundWindow method; the only condition is that the calling process should be able to set the ...

Get .NET Core 2.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.