Solved

MediaPlayer Filename

Posted on 1998-10-14
2
924 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
2 Comments
 
LVL 1

Accepted Solution

by:
lar_jens earned 10 total points
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 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

6 Experts available now in Live!

Get 1:1 Help Now