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 :(

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

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

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

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

  Alt 14. Sep 2006, 13: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
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.851 Beiträge
 
Delphi 11 Alexandria
 
#2

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

  Alt 14. Sep 2006, 14:03
hast dus mal über die GUID versucht?
Markus Kinzler
  Mit Zitat antworten Zitat
endeffects

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

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

  Alt 14. Sep 2006, 14:07
ich weiß nicht wie das funktioniert =(
  Mit Zitat antworten Zitat
shmia

Registriert seit: 2. Mär 2004
5.508 Beiträge
 
Delphi 5 Professional
 
#4

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

  Alt 14. Sep 2006, 14:08
Die Exception wird doch nur in der Delphi IDE angezeigt.
Danach kannst du doch mit F9 das Programm fortsetzen.
http://www.delphipraxis.net/internal...ct.php?t=47972
Andreas
  Mit Zitat antworten Zitat
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

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 16:42 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz