Files
wj32 7bd28e4357 moved branches, tags, trunk to 1.x branch
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@2304 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2009-10-25 02:22:46 +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);
}
}
}