Tip: How to use Win32 API Calls or Win32 DLL Functions

Here as tiny addendum: This approach works only with Windows Legacy Compatibility Mode. With .NET5+ an the error PlatformNotSupportedException occurs at compilation at when calling CompileAssemblyFromSource. This function is no longer supported.