Solved

MediaPlayer Filename

Posted on 1998-10-14
2
967 Views
Last Modified: 2008-03-06
How to set the Filename for a AVI-File for the Mediaplayer on Runtime?

I tried to set the name this way:

  sPfad:=ExtractFilePath(ParamStr(0));
  MediaPlayer1.FileName:=sPfad+'\bin\animauts.avi';

Why does the error EMCIDevice Error occurs? Where to place the Code in my Program,.... ??

Thanx Choli
0
Comment
Question by:Choli100298
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
lar_jens earned 10 total points
ID: 1342892
Do not use sPfad + '\bin\animauts.avi'; .. It won't work...

Use StrCat instead..

StrCat appends a copy of Source to the end of Dest and returns the concatenated string.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrCat(Dest, Source: PChar): PChar;

Description

StrCat does not perform any length checking. The destination buffer must have room for at least StrLen(Dest)+StrLen(Source)+1 characters.
To check length, use the StrLCat function.

0
 

Author Comment

by:Choli100298
ID: 1342893
Problem was not the string-operation. Problem was the media-player component. My String operation is ok.
Found the solution by myself.

thanx
Choli
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

726 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