Hello,
I started a new project yesterday as I’ve been sick the past couple of days :yucky: , so I have some free programming time on my hands. :bouncy:
For the fun of it I started to make a frontend for one of my N64 emulators & the 1st thing on my list was to conquer the plugins.
Accessing them is pretty simple with a couple of API’s, pretty much the same as if you were to load a PSX plugin, like so:
Then on a button or your pref. of control call:
Or
However I am wondering how I might go about using “GetDllInfo” to gather all the information about the plugin. So far all my attempts to accomplish this have been unsuccessful, any ideas on accomplishing this in VB .NET?
This is my 1st time tackling an N64 EMU-based project & I am not finding too many technical docs on the subject, any recommendations?
Thanks much!
I started a new project yesterday as I’ve been sick the past couple of days :yucky: , so I have some free programming time on my hands. :bouncy:
For the fun of it I started to make a frontend for one of my N64 emulators & the 1st thing on my list was to conquer the plugins.
Accessing them is pretty simple with a couple of API’s, pretty much the same as if you were to load a PSX plugin, like so:
Code:
<DllImport _
("kernel32.dll", CallingConvention:=CallingConvention.Winapi, _
EntryPoint:="LoadLibraryA", CharSet:=CharSet.Ansi)> _
Private Function LoadLibrary(ByVal lpLibFileName As String) As Integer
End Function
<DllImport _
("kernel32.dll", CallingConvention:=CallingConvention.Winapi, _
EntryPoint:="GetProcAddress", CharSet:=CharSet.Ansi)> _
Private Function GetProcAddress(ByVal hModule As Integer, ByVal lpProcName As String) As Integer
End Function
<DllImport _
("kernel32.dll", CallingConvention:=CallingConvention.Winapi, _
EntryPoint:="FreeLibrary", CharSet:=CharSet.Ansi)> _
Private Function FreeLibrary(ByVal hModule As Integer) As Integer
End Function
<DllImport("user32.dll", CallingConvention:=CallingConvention.Winapi, _
EntryPoint:="CallWindowProcA", CharSet:=CharSet.Auto)> _
Private Function CallWindowProc(ByVal lpPrevWndFunc As Integer, _
ByVal hwnd As Integer, ByVal Msg As Integer, ByVal wParam As Integer, _
ByVal lParam As Integer) As Integer
End Function
Public Sub PlugConfig(ByVal PlugPath As String)
Dim hProc, hModule, hResult As Integer
hModule = LoadLibrary(PlugPath)
hProc = GetProcAddress(hModule, About)
If hProc Then
hResult = CallWindowProc(hProc, 0, 0, 0, 0)
End If
hProc = GetProcAddress(hModule, "DllConfig")
FreeLibrary(hModule)
End Sub
Public Sub PlugAbout(ByVal PlugPath As String)
Dim hProc, hModule, hResult As Integer
hModule = LoadLibrary(PlugPath)
hProc = GetProcAddress(hModule, About)
If hProc Then
hResult = CallWindowProc(hProc, 0, 0, 0, 0)
End If
hProc = GetProcAddress(hModule, "DllAbout")
FreeLibrary(hModule)
End Sub
Then on a button or your pref. of control call:
Code:
PlugConfig(“C:\YourPath\YourPluggin.dll”)
Or
Code:
PlugAbout(“C:\YourPath\YourPluggin.dll”)
However I am wondering how I might go about using “GetDllInfo” to gather all the information about the plugin. So far all my attempts to accomplish this have been unsuccessful, any ideas on accomplishing this in VB .NET?
This is my 1st time tackling an N64 EMU-based project & I am not finding too many technical docs on the subject, any recommendations?
Thanks much!