ANother One

  • Thread starter Thread starter New Devil
  • Start date Start date
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
)
 
Sorry, that one is past my knowledge.
Not sure what WithEvents does or the C# version of it.

The attribute part may perhaps be
[gobjTapiWithEvents.VB_VarHelpID = -1]
but since VB_VarHelpID seems to refer to something in Visual Basic I don't
know what would happen in C#

Or in C# is | and the _ to indicate linebreak is never used since ;
indicates end of statement.
 
Back
Top