Files
mirror-processhacker/1.x/trunk/ProcessHacker.Native/Loader.cs
T
dmex ccfa57bb01 PH1.x: Replaced ConextMenu controls
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@4772 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2011-10-28 20:15:00 +00:00

39 lines
1.0 KiB
C#

using System;
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);
}
}
}