Here's a way to call APIs without DLLImport. I’ve first saw this years ago at OpenSC.ws as far as I remember and got into the idea. The code was lost since then but I found a copy.
It's a class which can dynamically call a Windows API function at runtime using Reflection.Emit.
Program.cs
[hide]
[code]
/*
* User: TMZ
* Date: April 15 2015
* Time: 12:48PM
*
* Released under GPLv2
*/
using System;
using System.Reflection;
namespace APICaller
{
class Program
{
|