I have the following code in C # that I am trying to connect to PowerShell. But I do not know how to transfer this order:
((_ISkypeEvents_Event)skype).CallStatus += CallStatusHandler;
If I just typed [Skype4COM.ISkypeEvents_Event] in my PowerShell console, I get:
Cannot find type [Skype4COM.ISkypeEvents_Event]: make sure the assembly containing this type is loaded.
However, I can get all the members of the $ skype object:
$skype = New-Object -ComObject Skype4COM.Skype
The following line does not work:
$skypeevent = [Skype4COM._ISkypeEvents_Event]$skype
If I try to call the method directly on the $ skype object, for example:
$skype.add_CallStatus({ write-host "yay" })
... he (as expected) tells me that:
Method call failed because [System .__ ComObject # {b1878bfe-53d3-402e-8c86-190b19af70d5}] does not contain a method named 'add_CallStatus'.
I tried to create a COM shell, but still I canβt get a type for the COM interface ...
Any ideas? Many thanks!
source share