Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MCI32.OCX error

Status
Not open for further replies.

IndyOD

Programmer
Aug 14, 2002
5
US
I have wav files played in a game I've written in Visual Basic 6.0. I've used the MCI control component with the proper code.

In the Sub Form_Load I have:
MMControl1.Notify = False
MMControl1.Wait = True
MMControl1.Shareable = False
MMControl1.DeviceType = "WaveAudio"
MMControl1.FileName = "C:\System\Regis Walks In.wav"
MMControl1.Command = "Open"

To play it I use the "Play" command and when I unload the form I "Close" it.

The problem is it works great on my computer. When I take it to another computer I get the following error:

"Component 'MCI32.OCX' or one of its dependencies not correctly registered: a file is missing or invalid"

I have tried removing Visual Basic completely and reinstalling it. I also created a new small test program after reinstalling it. I still get the error.

Does anyone have a suggestion, thought, or idea?

Thanks for any assistance you can provide.

IndyOD
 
Evidently the other computer doesn't have MCI32.ocx installed.

I guess you just copied your compiled program over.

You need to create a setup package, which will analyse your program and include all required ocx, dll files etc and ensure that they get copied, if neccessary to the target machine.

There are loads of these to choose from, but VB includes "Package and Deployment wizard" with its installation. Try that!

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Matt, Thank for a quick reply today.

I've checked both computers, both have a MCI32.OCX file dated 5/7/1999 and is 194 KB in sizelocated in the WINDOWS\system32 directory.

I tried the "Package and Deployment Wizard" you suggested. I created a package and took it to the other computer, it installed but I still receive the same error. Is it possible I have an old or corrupted OCX file?

Any more ideas?

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top