Windows Media Player 11.0 (Activex Bugs)

Reports of bugs and issues with Phoenix.
firefox78
Member
Posts: 11
Joined: Tue Jan 23, 2007 8:49 am

Windows Media Player 11.0 (Activex Bugs)

Postby firefox78 » Wed Jan 24, 2007 12:57 am

Error 420 in C:\Program Files\Phoenix\bin\projects\Project1.bas[2246:70]; Relational Operator Expected
Line 2246: ByVal @pvapi[0]

This is the sub procedure generated by Phoenix:

Code: Select all

'-------------------------------------------------------------------------------
'
' PROCEDURE: Form1_WindowsMediaPlayer1_CdromBurnErrorCP
' PURPOSE:   Occurs when a generic error happens while burning
'
'-------------------------------------------------------------------------------

SUB Form1_WindowsMediaPlayer1_CdromBurnErrorCP _
  ( _
  BYVAL pThis       AS DWORD, _         ' [in] automation object (IDispatch)
  BYVAL lParam      AS LONG, _          ' [in] application-defined value (handle of OLE container)
        pDispParams AS DISPPARAMSAPI, _ ' [in,out] pointer to a structure containing an array of arguments
        pVarResult  AS VARIANTAPI _     ' [out] pointer to a Variant or NULL if the caller expects no result
  )

  LOCAL oObject   AS DISPATCH
  LOCAL pvapi     AS VARIANTAPI PTR
  LOCAL pv        AS VARIANT PTR

  pv      = pThis
  oObject = @pv
  pvapi   = pDispParams.rgvarg
  pv      = pvapi

  Form1_WindowsMediaPlayer1_CdromBurnError oObject, _
                                           lParam, _
                                           BYVAL @pvapi[1].vd.punkVal, _
                                        [u] [b]  BYVAL @pvapi[0][/b][/u]
END SUB

TechSupport
Site Admin
Posts: 809
Joined: Tue Sep 14, 2004 7:55 pm
Location: Mississauga ON, Canada

Postby TechSupport » Wed Jan 24, 2007 6:30 pm

I will check it out asap.

TechSupport
Site Admin
Posts: 809
Joined: Tue Sep 14, 2004 7:55 pm
Location: Mississauga ON, Canada

Postby TechSupport » Thu Jan 25, 2007 2:28 am

I am not getting that error with my version of Phoenix or the last updated version
that is available for users with a license. Your version of Phoenix should be at
least 2.0.1.0. As for the demo, I don't remmember what version it is.
Earlier versions of Phoenix generated invalid code because hError is a VT_HRESULT paramater which was treated as an invalid parameter type. Heck, VB4.0 also bombs because VT_HRESULT
is not a valid parameter type.

You have two options
Option 1. Do not generate thhis event.
1) Select the media player control.
2) Open the editor for the WindowClass property.
3) Select the Custom Styles/Custom Messages tab.
4) Uncheck the CdromBurnError event in the Notifications listbox.
5) Click OK when done. Rebuild project.

Option 2. Manual fix.
The correct declare for the event handler is

Code: Select all

DECLARE SUB Form1_WindowsMediaPlayer1_CdromBurnError(BYVAL oObject AS WMPlayerWindowsMediaPlayer, _
            BYVAL lParam AS LONG, BYVAL pCdromBurn AS DWord, BYVAL hrError AS Long)

The correct event handler is

Code: Select all

'-------------------------------------------------------------------------------
'
' PROCEDURE: Form1_WindowsMediaPlayer1_CdromBurnErrorCP
' PURPOSE:   Occurs when a generic error happens while burning
'
'-------------------------------------------------------------------------------

SUB Form1_WindowsMediaPlayer1_CdromBurnErrorCP _
  ( _
  BYVAL pThis       AS DWORD, _         ' [in] automation object (IDispatch)
  BYVAL lParam      AS LONG, _          ' [in] application-defined value (handle of OLE container)
        pDispParams AS DISPPARAMSAPI, _ ' [in,out] pointer to a structure containing an array of arguments
        pVarResult  AS VARIANTAPI _     ' [out] pointer to a Variant or NULL if the caller expects no result
  )

  LOCAL oObject   AS DISPATCH
  LOCAL pvapi     AS VARIANTAPI PTR
  LOCAL pv        AS VARIANT PTR

  pv      = pThis
  oObject = @pv
  pvapi   = pDispParams.rgvarg
  pv      = pvapi

  Form1_WindowsMediaPlayer1_CdromBurnError oObject, _
                                           lParam, _
                                           BYVAL @pvapi[1].vd.punkVal, _
                                           BYVAL @pvapi[0].vd.lVal

END SUB

And CdromBurnErrorCP should be

Code: Select all

'-------------------------------------------------------------------------------
'
' PROCEDURE: Form1_WindowsMediaPlayer1_CdromBurnErrorCP
' PURPOSE:   Occurs when a generic error happens while burning
'
'-------------------------------------------------------------------------------

SUB Form1_WindowsMediaPlayer1_CdromBurnErrorCP _
  ( _
  BYVAL pThis       AS DWORD, _         ' [in] automation object (IDispatch)
  BYVAL lParam      AS LONG, _          ' [in] application-defined value (handle of OLE container)
        pDispParams AS DISPPARAMSAPI, _ ' [in,out] pointer to a structure containing an array of arguments
        pVarResult  AS VARIANTAPI _     ' [out] pointer to a Variant or NULL if the caller expects no result
  )

  LOCAL oObject   AS DISPATCH
  LOCAL pvapi     AS VARIANTAPI PTR
  LOCAL pv        AS VARIANT PTR

  pv      = pThis
  oObject = @pv
  pvapi   = pDispParams.rgvarg
  pv      = pvapi

  Form1_WindowsMediaPlayer1_CdromBurnError oObject, _
                                           lParam, _
                                           BYVAL @pvapi[1].vd.punkVal, _
                                           BYVAL @pvapi[0].vd.lVal

END SUB


Return to “Phoenix Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest