AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

was macht System.IsMultiThread genau?

Ein Thema von EWeiss · begonnen am 31. Mär 2007 · letzter Beitrag vom 2. Apr 2007
Antwort Antwort
EWeiss
(Gast)

n/a Beiträge
 
#1

Re: was macht System.IsMultiThread genau?

  Alt 2. Apr 2007, 06:18
Zitat von SirThornberry:
d.h du arbeitest mit ShareMem? Nicht das in D2006 ShareMem incompatibel zu ShareMem von D7 geworden ist oder sich die Strings intern irgendwie geändert haben.
Du könntest versuchen ob der Fehler bei den Kunden auch kommt wenn du die DLL mit Delphi7 kompilierst. Oder ist das schon der Fall?
habe oben nochmal editiert.

Nein eigentlich nicht.
Die Funktion befindet sich direkt in der *.dpr vielleicht verursacht dies das Problem
Kann ich mir aber eigentlich auch nicht vorstellen.

Delphi-Quellcode:
function BASS_VIS_FindPlugins(vispath: PChar; flags: DWORD): PChar; stdcall;
var
  fPath: PChar;
  i, z: Integer;
  Plugins: String;
  DllHandle: THandle;
  VisList: TStringList;
  sSonique, sWinamp, fRecursive: Boolean;

  procedure SearchDir(const dPath: String);
  var
    x: Integer;
    sRec: TSearchRec;
  begin
    if (sSonique) then
    begin
      x := FindFirst(dPath + '*.svp', faAnyFile, sRec);
      while (x = 0) do
      begin
        if (FileExists(dPath + sRec.Name)) then
          VisList.Add(dPath + sRec.Name);

        x := FindNext(sRec);
      end;
      FindClose(sRec);
      (* <-- START --> UltraPlayer vis *)
      x := FindFirst(dPath + '*.uvs', faAnyFile, sRec);
      while (x = 0) do
      begin
        if (FileExists(dPath + sRec.Name)) then
          VisList.Add(dPath + sRec.Name);

        x := FindNext(sRec);
      end;
      FindClose(sRec);
      (* <-- END --> UltraPlayer vis *)
    end
    else if (sWinamp) then
    if BassVisInit then
    begin
      x := FindFirst(dPath + '*.dll', faAnyFile, sRec);
      while (x = 0) do
      begin
        if (FileExists(dPath + sRec.Name)) then
          VisList.Add(dPath + sRec.Name);

        x := FindNext(sRec);
      end;
      FindClose(sRec);
    end else
     begin
       BassFuncs^.SetError(BASS_ERROR_INIT);
       exit;
    end;

    if (fRecursive) then
    begin
      x := FindFirst(dPath + '*.*', faAnyFile, sRec);
      while (x = 0) do
      begin
        if (sRec.Name <> '.') and (sRec.Name <> '..') and (DirectoryExists(dPath + sRec.Name)) then
          SearchDir(dPath + sRec.Name + '\');

        x := FindNext(sRec);
      end;
      FindClose(sRec);
    end;
  end;
begin
  Result := nil;

  if (((flags and BASS_VIS_FIND_SONIQUE) <> BASS_VIS_FIND_SONIQUE) and ((flags and BASS_VIS_FIND_WINAMP) <> BASS_VIS_FIND_WINAMP)) or
     (((flags and BASS_VIS_FIND_SONIQUE) = BASS_VIS_FIND_SONIQUE) and ((flags and BASS_VIS_FIND_WINAMP) = BASS_VIS_FIND_WINAMP)) then
  begin
    BassFuncs^.SetError(BASS_ERROR_ILLPARAM);
    Exit;
  end;

  if (FindPluginsPtr <> nil) then
    StrDispose(FindPluginsPtr);

  VisList := TStringList.Create;

  sSonique := ((flags and BASS_VIS_FIND_SONIQUE) = BASS_VIS_FIND_SONIQUE);
  sWinamp := ((flags and BASS_VIS_FIND_WINAMP) = BASS_VIS_FIND_WINAMP);
  fRecursive := ((flags and BASS_VIS_FIND_RECURSIVE) = BASS_VIS_FIND_RECURSIVE);

  fPath := StrAlloc(Length(StrPas(vispath)) + 2);
  StrCopy(fPath, vispath);
  if (fPath[Length(StrPas(fPath)) - 1] <> '\') then
    StrCat(fPath, '\');

  SearchDir(StrPas(fPath));

  StrDispose(fPath);

  if (VisList.Count = 0) then
  begin
    VisList.Free;

    BassFuncs^.SetError(BASS_OK);
    Exit;
  end;

  for i := VisList.Count - 1 downto 0 do
  begin
    SetCurrentDirectory(PChar(ExtractFileDir(VisList[i])+ #0));
    DllHandle := LoadLibrary(PChar(VisList[i]+ #0));

    if (DllHandle <> 0) then
    begin
      if (sSonique) and (GetProcAddress(DllHandle, 'QueryModule') = nil) then
        VisList.Delete(i)
      else if (sWinamp) and (GetProcAddress(DllHandle, 'winampVisGetHeader') = nil) then
        VisList.Delete(i);
    end
    else
      VisList.Delete(i);

    FreeLibrary(DllHandle);
  end;

  if ((flags and BASS_VIS_FIND_COMMALIST) = BASS_VIS_FIND_COMMALIST) then
  begin
    FindPluginsPtr := StrAlloc(Length(VisList.CommaText) + 1);
    StrPCopy(FindPluginsPtr, VisList.CommaText);
  end
  else
  begin
    z := 0;
    Plugins := '';

    for i := 0 to VisList.Count - 1 do
    begin
      z := z + Length(VisList[i]) + 1;
      Plugins := Plugins + VisList[i] + #0;
    end;
    Plugins := Plugins + #0;

    FindPluginsPtr := StrAlloc(z + 1);
    CopyMemory(FindPluginsPtr, PChar(Plugins), z + 1);
  end;

  VisList.Free;

  BassFuncs^.SetError(BASS_OK);
  Result := FindPluginsPtr;

end;
Zitat:
Du könntest versuchen ob der Fehler bei den Kunden auch kommt wenn du die DLL mit Delphi7 kompilierst. Oder ist das schon der Fall?[/
habs noch nicht getestet wäre aber eine möglichkeit das mal zu probieren.

Gruss Emil
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:49 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz