INTERACT FORUM
Windows => Plug-in Development => Topic started by: KingSparta on October 25, 2004, 01:20:52 pm
-
This Is The whole Program, When I Load It Up And Then Terminate Media Center Media Center Will Continue To Run In The Task Manage But Is No Longer Visable.
If I Remove
If Err.Number = 429 Then '
Set MYMJ = CreateObject("MediaJukebox Application") '
End If
then It Works Fine But This Was The Recomended Code In The SDK
Is There A Way To Fix This?
If So What Do I Need To Do?
************************************************
'Rem Set Up For MJAutomation
Public MYMJ As MediaJukebox.MJAutomation
Option Explicit
Private Sub UserControl_Show()
' Do Nothing At All
End Sub
Public Function Init(ByVal MediaJukebox As Object) As Variant
On Error Resume Next
' set the global Media Jukebox object on init '
' (Media Jukebox will call this function when the plugin starts) '
' Set MYMJ = MediaJukebox '
Set MYMJ = GetObject(, "MediaJukebox Application") '
If Err.Number = 429 Then '
Set MYMJ = CreateObject("MediaJukebox Application") '
End If
End Function
-
Try
Set MYMJ = Nothing
In the terminate function.
-
Try
Set MYMJ = Nothing
In the terminate function.
I did, thats how VB docs state to terminate it, but it still allows MC11 to run in the task manager but MC goes away from the desktop. i also tried that in Hide. for some rason MC11 wants to keep running if it is is in a plugin with out of prossess init code and the user terminates from the [X].
I changed it back to this (below) this was the orginal way prior to the Out-of-proc initialization code in the sdk now. It does work fine and allows mc to go away.
Public Function Init(ByVal MediaJukebox As Object) As Variant
On Error Resume Next
' (Media Jukebox will call this function when the plugin starts) '
Set MYMJ = MediaJukebox '
End Function