Recent

Author Topic: Stopping external programs  (Read 3882 times)

goldfish999

  • New Member
  • *
  • Posts: 29
Stopping external programs
« on: October 24, 2014, 07:24:50 am »
I need to start Windows Media Player to play a MP3 from a Laz program. That is working using ShellexecuteW but I want to be able to stop Media Player sometimes before it has completed the MP3. I have failed to find a method to do this.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8774
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Stopping external programs
« Reply #1 on: October 24, 2014, 08:40:10 am »
No idea with Windows function. Using TProcess, you can simply Terminate it.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11934
  • FPC developer.
Re: Stopping external programs
« Reply #2 on: October 24, 2014, 09:30:54 am »
There is unit mmsystem. It is about playing, but I don't know if it instruments the whole of mediaplayer or only the codec part.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Stopping external programs
« Reply #3 on: October 24, 2014, 10:12:21 am »
Feel free to add that to the list in
http://wiki.lazarus.freepascal.org/Multimedia_Programming
which incidentally lists audio libraries
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11934
  • FPC developer.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Stopping external programs
« Reply #5 on: October 24, 2014, 10:27:20 am »
Well no need to add it then... ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018