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.aspSo 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!