I cannot get this to work and some init commands is also wrong.
HeadKaze can you try if you can get this plugin to work?
Config button did also nothing to the Sound Event plugin?
I can init and getinfo to work (but for somereason, it diddent parsed correct).
Here is a new version of plugin that using these standard functions:
ProcedureDLL.l Juke_Command(Command.l, value.l)
ProcedureDLL.l Juke_Configure(winID.l)
ProcedureDLL.l Juke_GetPluginInfo(value.l)
ProcedureDLL.l Juke_Initialize(value.l)
ProcedureDLL.l Juke_Shutdown(value.l)
the commands used is on the readme file.
Only the last one seen to work without crash, so a least one function worked. There are messeqe requester to all functions if they can invoke to make sure it work.
I have no idea where it crash since I have no Visual Basic 6 and where I should fix, so I asume the commandlist is not 100% correct in the HOST?
We might give HedKaze a rest here and to help you and Barcrest I will expand on HeadKaze's VB6 example to help you find the problem. Hang on and I will post it here when done
They might unload the library automatic?
Pure Basic might used code, that require that, but cant see you doing that in your VB6 code?
In my wrapper I make sure the library is closed before exit and I have no problem in BlitzMax too (but did have many memory issues).
What does the debugger say, since I assume Visual Basic 6 debugger should catch the crash?
I tried Shutdown message to the bottom of the code, and it does show correct.
Public Function Shutdown() As Long
Dim RetVal As Long
If pShutdown <> 0 Then
RetVal = CallFuncPtr(pDC, pShutdown, vbNullString)
End If
FreeLibrary hDll ' <------------------ Unload the library
pGetPluginInfo = 0
pInitialize = 0
pShutdown = 0
pConfigure = 0
pCommand = 0
Shutdown = RetVal
End Function
Look like it a Bug in Visual Basic 6 itself under unload ???
I dosent have any unload code, since Pure Basic normally do that code itself. Suddently it works both in Delphi and BlitzMax (using a dll wrapper), but not Visual Basic 6....
What happens is you do NOT unload the dll?
The Configuration shows up for me but it does crash when it exits. In the VB6 Host example I only open up the config for the first plugin in the list. So try to remove the Plugins\JukePlugin.dll example so it will open your config.
I don't think there is anything wrong with the VB6 Host example. I suspect it's a problem in Space Fractals code otherwise the other two example plugins would crash on exit too right?
We might give HedKaze a rest here and to help you and Barcrest I will expand on HeadKaze's VB6 example to help you find the problem. Hang on and I will post it here when done
I don't think there is anything wrong with the VB6 Host example. I suspect it's a problem in Space Fractals code otherwise the other two example plugins would crash on exit too right?
I also want have your little host to read dll extension as well jps, so I can testing it with that without renaming dll file every time. But for all real hosts use jps extenison only.
Not in Purebasic, it just save as SoundEvent.jps.dll instead if I try. I need to rename that manual. I do still prefer JPS extension for any released plugins (Hence MultiJuke use JPS as well).