Solved

MediaPlayer Filename

Posted on 1998-10-14
2
957 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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

679 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