INTERACT FORUM

Please login or register.

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

Author Topic: Interface pluging using scrobj.dll  (Read 2614 times)

Soundman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 155
  • Go Music!
Interface pluging using scrobj.dll
« on: December 04, 2002, 08:34:43 am »

Hello.  I am trying to make an interface plug-in using Windows Script Components, so that my COM object will be written in a script language under Windows Script Host, as described here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/letusingwiz.asp

So far, I am getting the dreaded "Plugin must implement IUnknown interface" message when MJ attempts to load it.

I have a few basic questions:
1. The readme in the interface plug-in SDK implies that the only method I have to implement is Init(). Is this strictly true? I noticed that the sample WebRemoteCtrl plug-in exports lots of other functions, in addition to Init(), mostly dealing with GUI stuff.  For testing, my COM Automation object contains only an Init() method that calls MsgBox().  Do I need more methods in order for MJ to consider it a valid plug-in?

2. Does an interface plug-in actually have to create a GUI?  All I really want to do is get access to CMJAutomation and use it "behind the scenes," without a GUI.

3. Do I need to create a Type Library (.tlb) file? It does not appear that the other plug-in .dll's have a separate .tlb file that I have seen have a separate .tlb file, except for WebRemoteCtrl, but I am wondering if my lack of it could explain my problem?

4. What tool can I use to examine the public interface of an existing .dll file, to compare one that works with mine, to see what I may be missing?

I have successfully registered my simple COM object, created the MJ registry keys, and even instantiated it from another test script, which caused the MsgBox to show up. But MJ won't load it.

Here is the source:

<?xml version="1.0"?>
<component>

<?component error="false" debug="false"?>

<registration
     description="HCC Control"
     progid="HccMediaJukebox.Ctrl"
     version="1.0.01"
     classid="{13c4554f-24cc-4884-8340-0d86b41de544}"
>
</registration>

<implements type="ASP">
</implements>

<public>
     <method name="Init" dispId="0">
           <PARAMETER name="foobar"/>
     </method>
</public>

<script language="VBScript">
<![CDATA[

function Init(foobar)
     Init = "Temporary Value"
     MsgBox "Init Function Called!!!"
end function

]]>
</script>

</component>


Thanks!
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41962
  • Shoes gone again!
Re: Interface pluging using scrobj.dll
« Reply #1 on: December 04, 2002, 11:20:30 am »

It's probably that either the CLSID or ProdID values are wrong in the registry that tell MJ what COM control to create.

Also, try using only one of the two at a time -- there can be some weirdness with one but not the other.

Let us know...
Logged
Matt Ashland, JRiver Media Center

Soundman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 155
  • Go Music!
Re: Interface pluging using scrobj.dll
« Reply #2 on: December 04, 2002, 11:59:31 am »

Matt,

Thanks for your help.

I tried it again using only CLSID, with no luck.

Here is my MJ8 registration:
[HKEY_CURRENT_USER\Software\JRiver\Music Exchange\1.0\Media Jukebox\Plugins\Interface\HCC Control]
"CLSID"="{13c4554f-24cc-4884-8340-0d86b41de544}"
"IVersion"=dword:00000001
"Company"="HCC Solutions"
"Version"="1.0.01"
"URL"="www.nowhere.com"
"Copyright"="Copyright (c) 2002"
"PluginMode"=dword:00000001


Here is my Windows registration of the COM control:
[HKEY_CLASSES_ROOT\CLSID\{13C4554F-24CC-4884-8340-0D86B41DE544}]
@="HCC Control"

[HKEY_CLASSES_ROOT\CLSID\{13C4554F-24CC-4884-8340-0D86B41DE544}\InprocServer32]
@="C:\\WINDOWS\\System32\\scrobj.dll"
"ThreadingModel"="Apartment"

[HKEY_CLASSES_ROOT\CLSID\{13C4554F-24CC-4884-8340-0D86B41DE544}\ScriptletURL]
@="file://D:\\src\\mj\\int_hccctrl.wsc"

[HKEY_CLASSES_ROOT\HccMediaJukebox.Ctrl]
@="HCC Control"

[HKEY_CLASSES_ROOT\HccMediaJukebox.Ctrl\CLSID]
@="{13C4554F-24CC-4884-8340-0D86B41DE544}"



I also tried it again using only ProgID, to no avail.  Finally, I created and registered a Type Library in case that mattered, and it did not help.

Any other ideas?
Thanks!
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41962
  • Shoes gone again!
Re: Interface pluging using scrobj.dll
« Reply #3 on: December 05, 2002, 05:10:48 am »

I'm not sure :(

The next build of MC 9 will say whether it failed to create the control or whether it created it but couldn't find IUnknown.

Also, in a COM control, there's a few GUID's. Do you have the right one in the CLSID?

Does anybody with more Windows Script Components knowledge have any clues?
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up