Registriert seit: 14. Sep 2002
Ort: Steinbach, MB, Canada
301 Beiträge
Delphi XE2 Architect
|
Re: Bei Programmstart bass.dll im Systemordner initialisiere
5. Okt 2006, 22:56
Hi
Warum nimmst du nicht Dynamic_Bass?
Delphi-Quellcode:
Function Load_BASSDLL ( const dllfilename: string) :boolean;
const szBassDll = ' bass.dll' + #0;
var
oldmode:integer;
P: PChar;
s: string;
dllfile: array[0..MAX_PATH + 1] of Char;
begin
Result := False;
if BASS_Handle<>0 then result:=true {is it already there ?}
else begin {go & load the dll}
s := dllfilename;
if Length(s) = 0 then begin
P := nil;
if SearchPath( nil, PChar(szBassDll), nil, MAX_PATH, dllfile, P) > 0 then
s := StrPas(dllfile)
else exit;
end;
oldmode:=SetErrorMode($8001);
s := s + #0;
BASS_Handle:=LoadLibrary(pchar(s)); // obtain the handle we want
SetErrorMode(oldmode);
if BASS_Handle<>0 then
begin
|