Solved

Using AVI files with NT 4

Posted on 1999-01-22
3
149 Views
Last Modified: 2010-04-06
I am using Delphi 1.   The following procedure works great with Windows 95/98.   You simply pass the name of an AVI file, and the procedure will call MPLAYER to view/run the AVI file.  However, when this procedure is run on Win NT 4, nothing happens.  No error message, and no animation.  I suspect that MPLAYER is not a standard component of Win NT, as it is with Win 95/98.  If this is true, what then is the default multimedia player for WinNT 4?  And how would I modify the procedure so that it would be functional under both Win95/98 and NT 4?

procedure PlayTheAVI(AVIFile:string);
var
 PC: array[0..255] of char;
begin
 WinExec(StrPCopy(PC, 'MPlayer.exe /play /close '+ AVIFile), sw_Show);
end;

Thanks.
0
Comment
Question by:Monroe406
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
viktornet earned 80 total points
ID: 1362914
If there is no such a player you can't do anything about it... If there is a player like that in WinNT then it would be displayed...

you could try this also...

ShellExecute(0, 'MPlayer.exe /play /close '+ AVIFile, nil, nil, SW_NORMAL);

-Viktor
--Ivanov
0
 

Author Comment

by:Monroe406
ID: 1362915
Surely Windows NT 4 must ship with a default component to handle AVI files?  No?
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1362916
I'm not a WinNT person, but it probably should have something with it, or maybe not...

WinNT is created for people who need to work with the Network, and Win95/98 and the such are created for entertainment, so I'm not sure... I've never used WinNT, but there might be a player on the CD, so if someone wants to play a CD, he just installs the program and plays it.. YOu should ask a person who has winNT... The code should work if there is a media player installed, so you go and ask someone who has WinNT, if there is a orignal media player installed when you first install WInNT>..

-Viktor
--Ivanov
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now