Jump to content

Recommended Posts

Posted

Hi,

I use this code to create a wmp-object so that I can play music etc:

$pObj = ObjCreate('WMPlayer.OCX')

Well I made an installer for my program, some people don't have the wmp.ocx registred in the registry and/or they don't have the wmp.ocx at all. Now I need to know if wmp.dll is required by wmp.ocx to work properly.

I can't test this, because if I rename wmp.ocx or wmp.dll Windows automatically restores the files.

Hope that someone knows,

Andreas

Programs so far:Teh Serializer - Search for licenses for Nero - Windows - Office - Alcohol etc.
Posted (edited)

Hallo Noobster24

Yes, most components is actually wrappers for some libraries and the 'WMPlayer.OCX' wmp.ocx is just a wrapper to wmp.dll that is the actuall component and a masive library with tons of functions and embedded libraries - 17 controls ( objects ) not all public but internal object used by Windows Media Player -> these represent about 50 properties like IWMPPlayer object that holds the strechToFit and fullscreen ec. properties and there's sometring like 50 subobjects of the same type - a masive component...

post-4760-1199086016_thumb.jpg

as you can see point directy to wmp.dll but also to wmploc.dll ( toolbox and bitmaps I think ), wmplayer.exe ( ? ) and there's propably more needed...

kjactive :)

Edited by kjactive
Posted

Hallo Noobster24

Yes, most components is actually wrappers for some libraries and the 'WMPlayer.OCX' wmp.ocx is just a wrapper to wmp.dll that is the actuall component and a masive library with tons of functions and embedded libraries - 17 controls ( objects ) not all public but internal object used by Windows Media Player -> these represent about 50 properties like IWMPPlayer object that holds the strechToFit and fullscreen ec. properties and there's sometring like 50 subobjects of the same type - a masive component...

post-4760-1199086016_thumb.jpg

as you can see point directy to wmp.dll but also to wmploc.dll ( toolbox and bitmaps I think ), wmplayer.exe ( ? ) and there's propably more needed...

kjactive :)

Alright, so I should install wmp.dll, wmp.ocx, wmploc.dll etc. to make it work for people who don't have windows media player installed? (Just for that stupid ActiveX object ;P)

Andreas

Programs so far:Teh Serializer - Search for licenses for Nero - Windows - Office - Alcohol etc.
Posted (edited)

Hallo Noobster24

Well yes, but why not use a webbrowser with the medieplayer embedded as this will use the stuff needed from the Inet and is more independed - there is an easy webbrowser library called cwebpage.dll. This browser is easy to use, do all the stuff as 'WMPlayer.OCX' can do ( and a lot more ) from a few functions - this library can do a lot of stuff...

; hybrid code example script by Kåre Johansson 2007
; CWebpage library as medie player embedded HTML code

#include "GUIConstants.au3"
$dll = DLLOpen("cwebpage.dll")

$hwnd = GUICreate("MediePlayer...",510,520,-1,-1)
$pos = WinGetClientSize($hwnd)

DLLCall($dll,"long","EmbedBrowserObject","hwnd",$hwnd)
GUISetState()

$a = '<BODY scroll=no>' & _
'<OBJECT classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ' & _
'ID=APlayer style="position:absolute;left:0;top:0;width:510;height:520">' &  _
'<param name=AutoStart value=1>' & _
'<param name=uiMode value=full>' & _
'<param name=URL value="C:\temp\test.mpg"></OBJECT><\body>'

DLLCall($dll,"long","DisplayHTMLStr","hwnd",$hwnd,"str",$a)
While 1
   $msg = GUIGetMsg()
   If $msg = -3 Then ExitLoop
WEnd
$ret = DLLCall($dll,"long","UnEmbedBrowserObject","hwnd",$hwnd)

Func OnAutoItExit()
   DLLClose($dll)
EndFunc

kjactive :)

Edited by kjactive

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...