Deployment Mediaplayer project

  • Thread starter Thread starter Sjaakie Helderhorst
  • Start date Start date
S

Sjaakie Helderhorst

Hi,
I've been fooling around (noob) with VB.NET and put together a
remote-controlled Mediaplayer-based 'server'. Had some troubles configuring
interop on Windows XP with VS.NET 2003, but eventually things worked.

Problem is I can't run the built output on any computer other than my
own.... 'exception occured'. (Isn't VB.NET supposed to include all
references when 'copy local' is set to true?) Anyone familiar with this
problem (seems Mediaplayer-specific to me)? I don't know what to do next,
since there's no VS.NET installed on these systems, only dotNET-Framework
(latest version)...

I know it's little information, but I don't know how to provide you with any
more...
Thanks in advance.
 
Hi,

Sjaakie Helderhorst said:
Hi,
I've been fooling around (noob) with VB.NET and put together a
remote-controlled Mediaplayer-based 'server'. Had some troubles configuring
interop on Windows XP with VS.NET 2003, but eventually things worked.

Problem is I can't run the built output on any computer other than my
own.... 'exception occured'. (Isn't VB.NET supposed to include all
references when 'copy local' is set to true?)

I don't really understand what is your application supposed to do and to
look like but are you using a Windows Media Player component in it? (such as
the WMP Activex control). If yes, then you need to have the latest version
of WMP installed on every computer where you want to run your application.
Also check any other activex control that you may use: they need to be
installed and registered before you run the application (Windows installer
or a third party installer could do that for you).
 
Elp said:
Hi,



I don't really understand what is your application supposed to do and to
look like but are you using a Windows Media Player component in it? (such as
the WMP Activex control). If yes, then you need to have the latest version
of WMP installed on every computer where you want to run your application.
Also check any other activex control that you may use: they need to be
installed and registered before you run the application (Windows installer
or a third party installer could do that for you).

I'm using AxInterop.WMPLib.dll and wmppia.dll.
All systems run same version of MediaPlayer (9.00.00.3075).
Need I manually register some Mediaplayer components before I can use them
as references?
 
Sjaakie Helderhorst said:
I'm using AxInterop.WMPLib.dll and wmppia.dll.
All systems run same version of MediaPlayer (9.00.00.3075).
Need I manually register some Mediaplayer components before I can use them
as references?

When i was using WMP in my application, i used only WMPLib.dll, not
wmppia.dll (don't what is the latter for). It had copy local set to true and
the app was running fine on any computer as long as WMP 9 was installed so
your problem may be somewhere else. Have you tried to run WMP itself to see
if there's is nothing corrupted somewhere? (i remenber that WMP 9 often
broke suddently whithout any reason and i had to reinstall it to make
everything work again; the activex control was very buggy itself as well).

What is wmppia.dll used for? Have you checked that it was at the same place
in your development machine and in the other computer? Are all the needed
files (Interop.WMPLib.dll and AxInterop.WMPLib.dll) present in your
application's folder?

Are you using any other libraries not included in standard in the .NET
Framework? Or some API specific to a particular Windows version? Your
problem is maybe not related to WMP at all...
 
Sjaakie Helderhorst said:
Can you point me to a website or sample?
I used
http://msdn.microsoft.com/library/d...gdigitalmediainavisualbasicnetapplication.asp
to create this mess.

I've not read the whole article so i don't see why they are using a such
complicated procedure to do something that could be done with a few mouse
clicks. But it maybe allow you to have more control over WMP. I've had a
very quick look at your app but couldn't compile it as some references were
missing (probably because i have to follow the instructions given in your
link to make it work). I also don't really see the goal of your app: what
are you trying to do exactly?

However, if all that you want is embedd a WMP in your app, there is a simple
way to do it: create a VB windows application project, open your tool box,
right click on one panel of the tool box and choose Customize toolbox. Then
scroll down the COM components tab and check Windows Media Player. A new
icon will appear in your toolbox, just drag it on your application form and
that's it! You now have an embedded WMP. However, there is a known bug with
the WMP activex and VB: you'll have to move manually the line:
Me.AxWindowsMediaPlayer1.enabled = True

from the window form designer code to your New() function, put it just after
the InitializeComponents() call or your app won't start. You'll have to do
that each time you change your form design as this (buggy) code is
automatically generated by VS (this applies to VS 2002 and WMP 9, it has
maybe be fixed in the lattest versions).

I don't have any link on WMP and VB though as i am not a VB programmer but
you may find some with google (maybe on godotnet or some similar developper
community sites).
 
Elp said:
I also don't really see the goal of your app: what
are you trying to do exactly?

It's a player which gets it's file location from a SQL Database. Playlist
data is provided by a webbased interface running on IIS. This player is our
office-Jukebox, everyone can request its own favorite song.
A small 'remote control' provides a way of skipping, pausing and resuming.
However, if all that you want is embedd a WMP in your app, there is a simple
way to do it: create a VB windows application project, open your tool box,
right click on one panel of the tool box and choose Customize toolbox. Then
scroll down the COM components tab and check Windows Media Player. A new
icon will appear in your toolbox, just drag it on your application form and
that's it!

I probably have to unregister the PIA because everytime I add the Windows
Mediaplayer COM to the toolbox it automatically adds references to the
PIA... I'll give it a try.
Anyway, I found a solution: installed WMP SDK on jukebox system and
registered the PIA. Now it works, but I don't like this way of deploying an
app.

Thanks for you support!
 
Back
Top