Sign in to follow this  
Followers 0
jezzzzy

COM help

1 post in this topic

Trying to work with an .ocx file but have limited COM knowledge and little/no documentation on the methods or properties of the object. I ran OLEViewer and have a list of the methods but don't know where to go from here.

Here is my very simple code:

$objTapi = ObjCreate("AvayaPhoneInterface.PhoneInterfaceCtrl.1")
$event = ObjEvent($objTapi,"TAPIEvent_")

With $objTapi
    .switchIpAddress = "10.0.0.180"
    ;more methods to go here
EndWith

While 1
    ;nothing here yet
WEnd

Func TAPIEvent_($Eventname)
    MsgBox(0,"event",$Eventname)
EndFunc

Here is a part of the OLEViewer results:

dispinterface _DPhoneInterface {
    properties:
    methods:
        [id(0x00000001)]
        short registerExtension(
                        short forceLogin, 
                        VARIANT switchIpAddress, 
                        VARIANT extension, 
                        VARIANT password, 
                        VARIANT telecommuteNumber, 
                        VARIANT vpnOverideIp, 
                        short controlOnly, 
                        short emergencyHandling, 
                        VARIANT emergencyHandlingAtNumber);
        [id(0x00000002)]
        void offHook();
        [id(0x00000003)]
        void onHook();
        [id(0x00000004)]
        void dialDigits(VARIANT digitString);
        [id(0x00000005)]
        void pushButton(
                        short buttonNumber, 
                        short buttonModule);
        [id(0x00000006)]
        void transfer();
        [id(0x00000007)]
        void conference();
        [id(0x00000008)]
        void hold();
        [id(0x00000009)]
        void drop();
        [id(0x0000000a)]
        void unregisterExtension();
        [id(0x0000000b)]
        void beep(
                        short frequency, 
                        short duration);

I guess I don't know what the "variants" or "shorts" are. Once I get past the "registerExtension" method, I think I will be able to figure it out. All I get with the above code is "The requested action with this object has failed."

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0