INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Strange Error 429 problem  (Read 3463 times)

Robert S

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 80
Strange Error 429 problem
« on: July 13, 2004, 05:15:22 am »

I'm making a screensaver which should be a out-of-proc application and it's supposed to display the current song with big letters, and I therefore must use GetOject and not createObject.

The following code generates error 429 even though Media Center is started and I've got the reference set in vb:

Set MediaCenterApplication = GetObject(, "MediaJukebox Application")

But if I do like this:

Set MediaCenterApplication = GetObject("", "MediaJukebox Application")

then it works when I run the application.

But after stopping it after this, I have to remove the "" to get it to run again. After this It runs great until I've restarted Media Center, then I have to do it all over again.

I've done all obvious checks like that the tlb is not corrupt and I've only got one tlb on my system and I've also run it on VBRegTLB6.exe to make sure that it's properly registered. I've also now tested my app on media center 10 with the same result...

Apart from this, the screensaver works great.... ?

Why is this? What could it be caused by?

/Robert
Logged

Robert S

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 80
Re:Strange Error 429 problem
« Reply #1 on: July 15, 2004, 01:42:12 am »

I've almost cleaned out everything in the code now to find any errors and now the code looks like this (it still generates the error 429)

Option Explicit

Private MediaCenterApplication As MediaJukebox.MJAutomation
Private playNow As MediaJukebox.MJCurPlaylistAutomation

Private Sub Form_Load()
    On Error Resume Next
    Set MediaCenterApplication = GetObject(, "MediaJukebox Application")
    If Err.Number = 429 Then
        Me.Caption = "Error 429"
    Else
        Set playNow = MediaCenterApplication.GetCurPlaylist
        Me.Caption = playNow.GetFile(playNow.Position).Artist
    End If
End Sub

Can someone please guide me to what could be wrong?
Has anyone else done a out-of-proc application that works?

/Robert
Logged

EvilDude

  • Regular Member
  • Member
  • *
  • Posts: 1
  • Change this by choosing profile
Re:Strange Error 429 problem
« Reply #2 on: July 16, 2004, 11:22:28 pm »

Hi

I am new here, but know why you are getting the error.

If the application isn't running, it cannot get a reference to something that does't exist.


Basically, use this:

Set MediaCenterApplication = GetObject(, "MediaJukebox Application")

If Err.Number = 429 Then
    'Then, create a new object
    Set MediaCenterApplication = CreateObject("MediaJukebox Application")
End If
Logged

Robert S

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 80
Re:Strange Error 429 problem
« Reply #3 on: July 17, 2004, 02:54:59 pm »

But I get this error even though Media Center IS Running. I understand that I get it when MC is NOT running, then I would have to use Create, but I want to get information about the currently playing song in the media center process that was already running when I started my program.

/Robert
Logged
Pages: [1]   Go Up