Jump to content

COM help


Recommended Posts

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 = ""
    ;more methods to go here

While 1
    ;nothing here yet

Func TAPIEvent_($Eventname)

Here is a part of the OLEViewer results:

dispinterface _DPhoneInterface {
        short registerExtension(
                        short forceLogin, 
                        VARIANT switchIpAddress, 
                        VARIANT extension, 
                        VARIANT password, 
                        VARIANT telecommuteNumber, 
                        VARIANT vpnOverideIp, 
                        short controlOnly, 
                        short emergencyHandling, 
                        VARIANT emergencyHandlingAtNumber);
        void offHook();
        void onHook();
        void dialDigits(VARIANT digitString);
        void pushButton(
                        short buttonNumber, 
                        short buttonModule);
        void transfer();
        void conference();
        void hold();
        void drop();
        void unregisterExtension();
        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."

Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...