I'm trying to use LoadLibrary and GetProcAddress to load functions from a C++ dll. The problem I'm having is I don't know how to actually use the function I've loaded.

Here's some code:

Code:
Private Sub Main_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Dim LibraryHandle As IntPtr = LoadLibrary("C:\instant.dll")
        Dim FunctionHandle As IntPtr = CType(GetProcAddress(CInt(LibraryHandle), "Instant_Dialog"), IntPtr)
    End Sub
So, how do I use the function? Also, I want to add the dll as a resource instead of linking it to the directory, but I get an error when I use, "Me.Resources.Instant.dll")

Any suggestions? Thanks!