Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TAPI 3 Help required
Message
From
07/04/2004 08:19:49
 
 
To
06/04/2004 06:13:11
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00892550
Message ID:
00892867
Views:
37
In my continuing attempts to get the incoming call number using TAPI, I have started investigating the EventHandler in VFP. Something like the following should work, but does not (EVENTHANDLER returns .F.).

Does anyone with any expertise in Interfaces have any idea?
****************************
PROCEDURE RegisterCallEvents
LPARAMETERS m.AddressName

oTapi = CREATEOBJECT("tapi.tapi")
oTapi.Initialize
oTapi.EventFilter = 28			&& guess this is TE_CALLSTATE (0x8) OR TE_CALLMEDIA (0x10) OR TE_CALLNOTIFICATION (0x4)

FOR m.x = 1 TO oTapi.Addresses.Count
  oAddress = oTapi.Addresses.Item(m.x)
  IF oAddress.AddressName() = m.AddressName
    *glRegistrationToken = gobjTapi.RegisterCallNotifications(gobjAddress, fMonitor, fOwner, lMediaTypes, lCallbackInstance)
    m.RegistrationToken = oTapi.RegisterCallNotifications(oAddress, .F., .T., 0x8, 1)

  ENDIF
ENDFOR

oEvents = NEWOBJECT("myclass")
? EVENTHANDLER(oTapi, oEvents)    && returns false
RETURN

DEFINE CLASS myclass AS session OLEPUBLIC

  IMPLEMENTS ITTAPIDispatchEventNotification IN "tapi.tapi"

  PROCEDURE ITTAPIDispatchEventNotification_Event(TapiEvent AS VARIANT, pEvent AS VARIANT) AS VOID HELPSTRING "method Event"
    SET MESSAGE TO TRANSFORM(TapiEvent)
  ENDPROC

ENDDEFINE


RETURN
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform