using System.Runtime.InteropServices;
static extern IntPtr LoadLibraryEx(string lpFileName, IntPtr hFile, uint dwFlags);
static extern bool FreeLibrary(IntPtr hModule);
public static void Main(string[] args) {
Console.Write("불러올 모듈의 이름을 입력하세요: ");
string lpFileName = Console.ReadLine();
Console.WriteLine("{0} 모듈을 불러옵니다.", lpFileName);
IntPtr hModule = LoadLibraryEx(lpFileName, IntPtr.Zero, 0);
if ( hModule != IntPtr.Zero ) {
Console.WriteLine("{0} 모듈을 불러왔습니다. (주소: 0x{1:X8})", lpFileName, hModule.ToInt32());
Console.WriteLine("{0} 모듈을 불러오지 못했습니다.", lpFileName);