MULTI-Instance Question

Started by Chris,

Chris

Hi..so now I`m Back with one Qustion..at this Moment I`m developing a BassPlayer for Delphi....
(supporting  Speaker,Pitch,FadeOut,FadeIn,Effects,other location of the dll ) and many more things.....If I`m ready i will post it but vor now my Question.

The Orginal Dynamic.pas Code ist
//////////////////////////////////////////////////
const BASS_Handle:Thandle=0;
Function Load_BASSDLL (const dllpath:string ; const dllfilename:string) :boolean;

Function Load_BASSDLL (const dllpath:string ; const dllfilename:string) :boolean;
var DlPath:String;
var pt:pchar;
var oldmode:integer;
begin
  if BASS_Handle<>0 then result:=true {is it already there ?}
  else begin {go & load the dll}
    if (dllpath[length(dllpath)]<>'\') then dlpath:=dllpath+'\' else dlpath:=dllpath; {path with \ or without... add a \ if there isn't one...}
    pt:=pchar(dlpath+dllfilename); {now cast it a bit}
    oldmode:=SetErrorMode($8001);
    BASS_Handle:=LoadLibrary(pt); // obtain the handle we want
    SetErrorMode(oldmode);
    if BASS_Handle<>0 then
       begin {now we tie the functions to the VARs from above}      


And here Is my Error How can I add more BassInstances ??
in my Componnt I have an Extra Option where the User can set the directory from the location off the bass.dll

Thanks
Chris

fredvs

Hello Chris, i dont understand your question, what want you to do ?

Ian @ un4seen

QuoteAnd here Is my Error How can I add more BassInstances ??
I don't know if Delphi allows arrays of function pointers. If it does, you can use that (as the MULTI.C example does). If it doesn't, you can duplicate the function "vars" in DYNAMIC_BASS.PAS, and rename them slightly for the 2nd instance.