Forget Controls MultiMedia. Now By API Support DVD Video Version 6.1

Submitted on: 1/7/2015 7:03:00 PM
By: Abdullah Al-Ahdal (from psc cd)  
Level: Advanced
User Rating: By 201 Users
Compatibility: VB 5.0, VB 6.0
Views: 5081
     (New version, now version 6.1 with control volume channels audio) Hello, You can here make Controls for audio,video and midi files just by pure Windows API. you can open,play,pause,resume,stop,close,make control for audio channels,Get Progress,Get Total Time,Get Total frames,Get Number frames per second,SetAutoRepeat,GetCurrent frame (Get current position),Get cuurent time,Get Actual size,Get Current Size,resize the movie,SetDefaultDevice,let you at the end of file..for all types Multimedia qt,mov, dat,snd, mpg, mpa, mpv, enc, m1v, mp2,mp3, mpe, mpeg, mpm au,snd, aif, aiff, aifc,wav,avi,mid,rmi,(and *.vob this format for dvd video)...etc.

This article has accompanying files


Are you Sure wanna using API to Playing video or audio files and forget ocx?


Version 6.1

Are you Sure wanna using Windows API to Playing video *.dat) or audio (including (including *.mpg and *.mp3) or Midi files and forget ocx?
Then Download this source.

I know the Controls like MCI32.ocx, ActiveMovie and Media player can do this but the control have disadvantages like it size about more than 90 kb,but now your program just will increased 6 kilo bytes(this size of the Module) and not take system resources.

Note : This source code Support DVD's Video if you had VGA Card Support DVD like ATI RAGE II Or All in Wonder 128.

Please reRead the description for Function OpenMultimedia in the Module or in the form(This simple update for version 5.0)

Advantages for this Source Code

1-This code Just use Windows API calls (no ocx) ,no install new dll.

2-This code work useful for Windows98,Windows 2000 and Windows NT without installing any other programs.

3-It has ready functions in the Module or Dll for Standerd use just for copy and paste in your own projects.

4-More faster than WinAmp and Xing Mpeg in playing and viewing Movie.

5-It can playing all Multimedia files by less lines included mp3,mpg,avi,wav..etc.

6-It has the most controls for multimedia files(keep on reading the page and you will know the controls).

7-It can open all movie files.

8-It have descriptions.

9-It Include four Sources in the zip (three for vb and dll in C++).

10-It for all Levels (advanced - intermediate - beginner).

11-very easy (read the code carefully).

12-Others (keep on reading this page).

This code Updated to be more well Download it again

Please reRead the descriptions for function OpenMultimedia in the form or in the Module.

Version 6.1

Special thanks to "Hans de Vries" For Notice me about bug when playing rmi files in some computers (it was repaired).

Version 6.0

For request Members planet-source-code I add four Functions:

1-Two Functions to deal with volume audio for every channel(left or right) or the the both:

one to get volume for every channel audio and the another to set volume for every channel or the both.

NOTE: Contolling with volume for every Multimedia file not for all Multimedia files(not like Mixer windows).

2-Two Functions to deal with Rate playing Multimedia file (one to increase speed playing or decrease speed playing and the another to get current Rate).

NOTE: Contolling with Rate for every Multimedia file not for all Multimedia files.

Via this version you can watch a movie file and also playing mp3 file at the same time and decrease the volume for mp3 in one channel or the both.

See the screenshot.

Good luke.

Version 5.0

1-In this version there were common errors in Windows 2000 was repaired (now the code useful for win2000).

2-I added Function for Channels Audio Control (see the screenshot).

What the Advantages for this Update?

you can here play on Left channel audio file and on right channel another audio file at the same time Or:

play the file two times at the same time one on the left and the another on the right.

Click on buttons "Demo" to see some effect by this way.

Note: you must Extract all files from the zip.

Good luke.

(Update IIII)

there were some common errors in Windows NT4 was repaired (Special thanks to Alex for notice me)

and I added function for request memebers to get the actual size and current size.

Note the update just in source "MultiMedia Contoller"

(Update III)

I added the source code which sent to MSDN library and it Update for previous version from "Pure API".

What the Advantages for this Update?

It can open more than one Multimedia file at the same time and play it .


(you can play more than one mp3 or movie at the same time).

Important note: You can play a lot files at same time if it from type "MPEGVideo" this mean just the following types you can play it altogther :

qt,mov, dat,snd, mpg, mpa, mpv, enc, m1v, mp2,mp3, mpe, mpeg, mpm au,snd, aif, aiff, aifc,wav,,etc.

and the following types can not play altogether :

mid,rmi,avi. becsause the sound card will be busy.

anyway most peoples using mpg,dat,mov,etc for the movie and mp3,mp2,mp1,wav,etc for the audio and if you have movie (avi) you can convert it to mpg ,dat ,mov or any other mpegs types and play it altogther.

if you wanna the ways to convert avi to mpegs types please contact to me at :

this will benefit you if you wanna make some simple games,,etc.

see the picture in this page to show the program.


I added two Functions one to Get Frames per Second

and the Another to let you know if the File Multimedia at the End (this benefit you if you wanna play a list of Multimedia Files).


You can by this update to open any file even have spaces.(Special Thanks to Janet)

And I added two Functions to repair any problem will met you if you used Xing Mpeg Drivers.

You can here Play all MultiMeida Files by Pure API

in first if you wanna playing these types:
qt , mov, dat,snd, mpg, mpa, mpv, enc, m1v, mp2,mp3, mpe, mpeg, mpm
au , snd, aif, aiff, aifc,wav.
The Secret is:
You Must use when you write Command To MCI by Function
mciSendString write like this :
open c:\myfile type MpegVideo .......etc
note: we written "MpegVideo" as a type
and we will written
open c:\myfile type AviVideo .......etc
if we wanna opening avi files
I got this info "MPEGVideo" for how you can plays MPEGs types from my experinace when
I openned file system.ini and I saw the section of MCI like this:
extensions Type extensions Type
snd MPEGVideo Mid Sequencer
qt MPEGVideo rmi MPEGVideo
dat MPEGVideo wav waveaudio
mpg MPEGVideo avi AVIVideo
mpeg MPEGVideo cda CDAudio
mpe MPEGVideo aif MPEGVideo
mpa MPEGVideo aiff MPEGVideo
mp2 MPEGVideo aifc MPEGVideo
mov MPEGVideo m1v MPEGVideo
au MPEGVideo vob (DVD) MPEGVideo

this mean if you wanna open mpg or dat file you will choose
type "MpegVideo"
and if you wanna open avi Files you will choose type "AviVideo"
And Remember Dealing with type "MpegVideo" like dealing with type
You can also found this info I downloaded it in a Complete program in planet source in the past
Under Name "
MPEG Viewer" to playing video in any place you want for e.g. in your Desktop.
anyway maybe you will say now I wanna a standard commands in a module or dll to dealing with
"MpegVideo" and other types like :

1-Open most multimmedia files
2-Playing it

3-Pause it

4- Stop it

5-Resume it

6-Close it

7-Get Current position(current frame)

8-Get current time

9-Get Percent of playing file

10-make it auto Repeat

11-Get Total frames

12- Get Total Time

13-Get the Status of file if it "playing or stopped or paused"

14-Get actual size (new).

15-Get current size (new).

16-Resize the movie.

17-Get number frames per second

18-let you know if multimedia at the end now.

19-Get current Rate.(new)

20-increase or decrease rate playing.(new)

21-Get current volume for every channel (left or right) or the both.(new)

22-Set volume for every channel (left or right) or the both.(new)

23- turn off or turn on every channel or the both.(new)

You have three ways to doing this:
1-if you are using VB and wanna uses module in your code and calling the functions from it (this option is the best for you).the exe are "Multimedia Controller.exe" and "Pure API.exe"

2-if you are using VB and wanna uses library dll made by C++ to calling functions the exe is "calldll.exe".

3-if you are using VC++ and wanna calling functions from dll or copy and paste the functons in your projects.(well option for who using VC++)

Note there are Update III which sent to MSDN library under name "Multimedia Controller"

Please Download the code and read it carefully

Note: I downloaded the source of the dll.

if you are wanna using the module you can calling the functions from the Module without using the dll.
if you are advanced you can read the dll and the module or if you are
Beginner just copy and paste the module in your project and just know how you can calling the functions(very easy for all levels Advanced -Intermediate-Beginner).
Note : I written the DLL in C++ and the Module in Visual basic for Planet-Source Specially and for standard use and you can Develop it,but please send to me a copy:).

Note all Multimedia extensions you can play it

You have in Module and dll a standard Functions for all users to Do what you want in Multimedia(commands very easy, any one can use it)

I Think You will never use any controls for Multimedia If you Downloaded This Code.

I think you while reading the source you will forget vote me , don't forget=:)Okay?.


Nice Example

Download Sample Movie

Run the program and Select the Movie which you downloaded it

1-Click on button "open" and

2-write in textbox "from" Value "20"

3-write in textbox "to" Value "70"

4-Click on button "play"

5-Set check auto repeat true

This Example will let the movie played from frame number 20 to frame number 70

Listen the Songer will say "Think in love" (just). :).

if you want to play the file from beginning to end remove any value from testbox "from"

and textbox "to" .Enjoy :)

winzip iconDownload article

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net

Other 4 submission(s) by this author


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this article (in the Advanced category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

 There are no comments on this submission.

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular article, please click here instead.)

To post feedback, first please login.