Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TAPI 3 Help required
Message
De
07/04/2004 08:19:49
 
 
À
06/04/2004 06:13:11
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00892550
Message ID:
00892867
Vues:
36
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform