I'm are really tired of it. last time Im used a thread, with some of these problem functions, that elsewice caused a error to blitzmax. That thread was never ended.
but is it a better method?
Code: Select all
ProcedureDLL.l BASS_Init(device.l, freq.l, path$)
Dir.s=path$+"plugins\"
Formats=""
BASS_ID=OpenLibrary(#PB_Any, path$+"bass.dll")
RESULT=CallFunction(BASS_ID,"BASS_Init", device.l, freq.l, 0, 0, 0)
If result=0 : ProcedureReturn RESULT : EndIf
GetExtensions(Dir)
Directory$ = Dir
If ExamineDirectory(0, Directory$, "*.dll")
While NextDirectoryEntry(0)
If DirectoryEntryType(0)
FILE.S=Dir.s+DirectoryEntryName(0)
PLUGIN=CallFunction(BASS_ID,"BASS_PluginLoad", FILE)
If PLUGIN<>0
var.BASS_PluginGetInfo = GetFunction(BASS_ID, "BASS_PluginGetInfo")
*INFO.BASS_PLUGININFO = var(PLUGIN)
FormatC=*INFO\formatc
For i=0 To Formatc-1
TEXT=PeekS(*INFO\Format\exts)
Formats=Formats+TEXT
*INFO\Format+SizeOf(BASS_PLUGINFORM)
Next
EndIf
EndIf
Wend
MessageRequester(Formats,"")
FinishDirectory(0)
EndIf
ProcedureReturn RESULT
EndProcedure
[EDIT]
It seen it this line it dosent like, but I have no clue why it dosent work:
Code: Select all
PLUGIN=CallFunction(BASS_ID,"BASS_PluginLoad", FILE)