r3032 - COM object claimed not to have a method it should have

7 views
Skip to first unread message

Phil Rhodes

unread,
Dec 31, 2009, 2:06:13 PM12/31/09
to jsl...@googlegroups.com
Hi,
 
I've been attempting to use a COM object which is designed to control Blackmagic Decklink video capture boards. This COM object is in development, and is a (very thin) wrapper around a .net assembly. The C# source code for this wrapper is attached. I have also attached the .dll file representing the COM object, although to work it will require the .net 2.0 framework, the ClickSphere Decklink.NET assembly, Blackmagic Decklink drivers, and Decklink hardware (the drivers will not install without the hardware, unfortunately).
 
Register the assembly as a COM object:
 
\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm.exe /codebase DeckLinkWrapper.dll /tlb
 
Under cscript:
 
var player = new ActiveXObject('DecklinkPlayback');
WScript.Echo(player.GetCardCount());

C:\Stuff\devel\decklink.net\wrapper>cscript /nologo test.js
1
 
Under jshost:
 
var player = createComObject("DecklinkPlayback");
print(player.GetCardCount());
 
C:\Stuff\devel\seq>jshost -l 1 comtastic.js
Helpers: Logger using JSLibs/SpiderMonkey print.
comtastic.js:8: TypeError: player.GetCardCount is not a function
 
I will also raise this with the developer who wrote the C# wrapper for the .net assembly.
 
Any suggestions?
 
Regards,
 
Phil
ComDeckLink.cs
DeckLinkWrapper.dll

Phil Rhodes

unread,
Dec 31, 2009, 2:22:56 PM12/31/09
to jsl...@googlegroups.com
Further to the earlier, trying to:

var player = createComObject("DecklinkPlayback");
player.selectCard(0);
 
Gives:

C:\Stuff\devel\seq>jshost -l 1 comtastic.js
uncaught exception: [object WinError]
 
Regards,
 
P

Phil Rhodes

unread,
Dec 31, 2009, 9:06:15 PM12/31/09
to jsl...@googlegroups.com
Further to earlier, after some enquiry and perusal of the C++ code:

> var player = createComObject("DecklinkPlayback");

> print(player.GetCardCount()); // TypeError: player.GetCardCount is not a
> function

JSlibs is incorrectly seeing getCardCount as a get property. This works:

print(player.getCardCount); // prints 1

Anything I need to call with arguments (such as selectCard(0) etc) throws an
[object WinError] with no description.

Regards,

P

Reply all
Reply to author
Forward
0 new messages