INTERACT FORUM

Windows => Plug-in Development => Topic started by: SBrandsborg aka Mouseman on April 20, 2004, 01:21:19 am

Title: Out Of Proc.
Post by: SBrandsborg aka Mouseman on April 20, 2004, 01:21:19 am
Can anyone come with a code example to how i get out of proc. to work in VB


i use MediaCenter91319.exe
Title: Re:Out Of Proc.
Post by: RhinoBanga on April 20, 2004, 06:02:17 am
http://yabb.jriver.com/interact/index.php?board=6;action=display;threadid=17409


Make sure you reference MC in your VB project.
Title: Re:Out Of Proc.
Post by: SBrandsborg aka Mouseman on April 20, 2004, 06:14:45 am
i think i have remembered to reference to the tfl file in vb but not sure if its the right one

but is this code working?

Code: [Select]
Private Sub Form_Load()

Dim myMJ As MediaJukebox.MJAutomation
Set myMJ = GetObject(, "MediaJukebox Application")
If Err.Number = 429 Then
    Set myMJ = CreateObject("MediaJukebox Application")
End If

Dim myFields As MediaJukebox.MJFieldsAutomation
Set myFields = myMJ.GetFields

Dim myField As MediaJukebox.MJFieldAutomation
For loop1 = 0 To myFields.GetNumberFields
    Set myField = myFields.GetField(loop1)
    MsgBox myField.GetName(True)
Next

End Sub


do i need more than that code to get it working?
Title: Re:Out Of Proc.
Post by: RhinoBanga on April 20, 2004, 06:28:43 am
That code works fine as is ... as long as MC is referenced in your VB project.
Title: Re:Out Of Proc.
Post by: SBrandsborg aka Mouseman on April 22, 2004, 01:50:01 am
I have alot of troble dealing with out of proc is there a vb project example anyone can send me? that will be very big help
Title: Re:Out Of Proc.
Post by: RhinoBanga on April 22, 2004, 02:15:45 am
Didn't the above code work for you?
Title: Re:Out Of Proc.
Post by: SBrandsborg aka Mouseman on April 22, 2004, 05:10:54 am
nope :s i have downloaded mc 10.0.111 and tryed the tfl (think it was the name) file from there

so do you have an example vb project example you can sent??

steffen@sbrandsborg.dk
Title: Re:Out Of Proc.
Post by: RhinoBanga on April 22, 2004, 05:23:56 am
I can't send you anything till I get home this evening as we only have VC++ here.

What error did you get?

The above code works and was used to hilight a MJFieldAutomation bug.

What MC module did you include in Project/References?
Title: Re:Out Of Proc.
Post by: SBrandsborg aka Mouseman on April 22, 2004, 05:36:38 am
Im at work now to ;) can't remember the error right now but i will post it later :)
Title: Re:Out Of Proc.
Post by: RhinoBanga on April 22, 2004, 11:01:06 am
Dude,

I just emailed you the sample.

The only difference is that I added an "On Error Resume Next" before the first dim.

And the reference you should be adding is just "MediaJukebox".
Title: Re:Out Of Proc.
Post by: Rob L on April 22, 2004, 01:42:09 pm
There were problems with the typelibrary (tlb file) not registering properly in some versions though, weren't there? wasn't it around that version?