Files
dmex b02427417c PH1.x: fixed build
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@5614 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2014-02-25 23:14:38 +00:00

41 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using ProcessHacker.Native.Api;
namespace ProcessHacker.Native
{
public static class Loader
{
public static IntPtr GetProcedure(string dllName, string procedureName)
{
return GetProcedure(GetDllHandle(dllName), procedureName);
}
public static IntPtr GetProcedure(IntPtr dllHandle, string procedureName)
{
return Win32.GetProcAddress(dllHandle, procedureName);
}
public static IntPtr GetProcedure(IntPtr dllHandle, int procedureNumber)
{
return Win32.GetProcAddress(dllHandle, (ushort)procedureNumber);
}
public static IntPtr GetDllHandle(string dllName)
{
return Win32.GetModuleHandle(dllName);
}
public static IntPtr LoadDll(string dllName)
{
return Win32.LoadLibrary(dllName);
}
public static bool UnloadDll(IntPtr dllHandle)
{
return Win32.FreeLibrary(dllHandle);
}
}
}