AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi GetActiveOleObject('WMPlayer.OCX') funktioniert nicht :(
Thema durchsuchen
Ansicht
Themen-Optionen

GetActiveOleObject('WMPlayer.OCX') funktioniert nicht :(

Ein Thema von endeffects · begonnen am 14. Sep 2006 · letzter Beitrag vom 14. Sep 2006
 
endeffects

Registriert seit: 27. Jun 2004
450 Beiträge
 
#1

GetActiveOleObject('WMPlayer.OCX') funktioniert nicht :(

  Alt 14. Sep 2006, 14:05
Hallo,

ich möchte mit foglendem SourceCode in mehreren Threads
die Titel-, Interpreten- und Albennamen von diversen
wma Dateien auslesen. Leider bleibt der Compiler hier hängen:

wmplayer := GetActiveOleObject('WMPlayer.OCX');

Mit der Meldung dass das Objekt nicht gefunden worden ist.
Weiß Jemand wie ich das beheben kann?

Delphi-Quellcode:
type
  TWMAFileInfo = record
    Duration: string;
    Author: string;
    CurrentBitRate: string;
    FileSize: string;
    Is_Protected: Boolean;
    SourceURL: string;
    Title: string;
    Album: string;
    Composer: string;
    Genre: string;
    Lyrics: string;
    TrackNumber: Integer;
    Year: Integer;
  end;

...

procedure TMyThreads.ReadWMATag(Filename: string; var TagInformation: TWMAFileInfo);
var
 wmplayer, wmfile: OLEVariant;
begin
 try
  try
   wmplayer := GetActiveOleObject('WMPlayer.OCX');
  except
   wmplayer := CreateOleObject('WMPlayer.OCX');
  end;
  wmfile := wmplayer.newMedia(Filename);

  TagInformation.Duration := wmfile.durationString;
  TagInformation.Author := wmfile.getItemInfo('Author');
  TagInformation.CurrentBitRate := wmfile.getItemInfo('CurrentBitRate');
  TagInformation.FileSize := wmfile.getItemInfo('FileSize');
  TagInformation.Is_Protected := wmfile.getItemInfo('Is_Protected');
  TagInformation.SourceURL := wmfile.getItemInfo('SourceURL');
  TagInformation.Title := wmfile.getItemInfo('Title');
  TagInformation.Album := wmfile.getItemInfo('WM/AlbumTitle');
  TagInformation.Composer := wmfile.getItemInfo('WM/Composer');
  TagInformation.Genre := wmfile.getItemInfo('WM/Genre');
  TagInformation.Lyrics := wmfile.getItemInfo('WM/Lyrics');
  TagInformation.TrackNumber := wmfile.getItemInfo('WM/TrackNumber');
  TagInformation.Year := wmfile.getItemInfo('WM/Year');
 finally
  wmfile := unassigned;
  wmplayer := unassigned;
 end;
end;
  Mit Zitat antworten Zitat
 


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 11:18 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 by Thomas Breitkreuz