I am trying to access the GetProcAddress
function in the kernel32.dll from my C# .NET 2.0 application. The MSDN sites shows its C prototype as
FARPROC WINAPI GetProcAddress(
__in HMODULE hModule,
__in LPCSTR lpProcName
);
How do I convert this to C#? I think I've got most of it:
private static extern delegate GetProcAddress(IntPtr hModule, string lpProcName);
However, I think use of the delegate
keyword is wrong. What should I change, so that I can access this function from my application? Thanks.