N
New Devil
Hi all,
Can anybody help me to convert this code from VB to C#....i got this
code from msdn but i want to do this in C# ....
plz help if u can....thanx
the code is...
/***************************************/
Dim WithEvents gobjTapiWithEvents As TAPI
Attribute gobjTapiWithEvents.VB_VarHelpID = -1
Dim glRegistrationToken As Long
'Usually performed at the same time
'as TAPI initialization
Const TAPI3_CALL_EVENTS = _
TE_CALLMEDIA Or _
TE_CALLNOTIFICATION Or _
TE_CALLSTATE
'Set the EventFilter to accept all defined TAPI events.
gobjTapi.EventFilter = TAPI3_CALL_EVENTS
'Register the outgoing interface (the one that will actually
'receive and process the events).
Set gobjTapiWithEvents = gobjTapi
Dim fOwner As Boolean, fMonitor As Boolean
Dim lMediaTypes As Long, lCallbackInstance As Long
'fOwner = True ensures that the application receives incoming calls
'and their call state events.
fOwner = True
fMonitor = False
lMediaTypes = TAPIMEDIATYPE_AUDIO
lCallbackInstance = 1
glRegistrationToken = gobjTapi.RegisterCallNotifications( _
gobjAddress, _
fMonitor, _
fOwner, _
lMediaTypes, _
lCallbackInstance
)
Can anybody help me to convert this code from VB to C#....i got this
code from msdn but i want to do this in C# ....
plz help if u can....thanx
the code is...
/***************************************/
Dim WithEvents gobjTapiWithEvents As TAPI
Attribute gobjTapiWithEvents.VB_VarHelpID = -1
Dim glRegistrationToken As Long
'Usually performed at the same time
'as TAPI initialization
Const TAPI3_CALL_EVENTS = _
TE_CALLMEDIA Or _
TE_CALLNOTIFICATION Or _
TE_CALLSTATE
'Set the EventFilter to accept all defined TAPI events.
gobjTapi.EventFilter = TAPI3_CALL_EVENTS
'Register the outgoing interface (the one that will actually
'receive and process the events).
Set gobjTapiWithEvents = gobjTapi
Dim fOwner As Boolean, fMonitor As Boolean
Dim lMediaTypes As Long, lCallbackInstance As Long
'fOwner = True ensures that the application receives incoming calls
'and their call state events.
fOwner = True
fMonitor = False
lMediaTypes = TAPIMEDIATYPE_AUDIO
lCallbackInstance = 1
glRegistrationToken = gobjTapi.RegisterCallNotifications( _
gobjAddress, _
fMonitor, _
fOwner, _
lMediaTypes, _
lCallbackInstance
)