Imports System.Runtime.InteropServices
Shared Function LoadLibraryEx(lpFileName As String, hFile As IntPtr, dwFlags As UInteger) As IntPtr
Shared Function FreeLibrary(hModule As IntPtr) As Boolean
Public Shared Sub Main(args As String())
Console.Write("불러올 모듈의 이름을 입력하세요: ")
Dim lpFileName As String = Console.ReadLine()
Console.WriteLine("{0} 모듈을 불러옵니다.", lpFileName)
Dim hModule As IntPtr = LoadLibraryEx(lpFileName, IntPtr.Zero, 0)
If hModule <> IntPtr.Zero Then
Console.WriteLine("{0} 모듈을 불러왔습니다. (주소: 0x{1:X8})", lpFileName, hModule.ToInt32())
Console.WriteLine("{0} 모듈을 불러오지 못했습니다.", lpFileName)