TAPI woes

Greetings all!

I have had a great deal of trouble finding information about TAPI 3.1, as I'm sure a lot of people have.  It's the single most poorly documented & cryptic item I have ever encountered as a software developer.  I have broken into the technology a bit, and have successfully coded a small app that will answer the phone, show caller ID info, etc.  However, it only works once.  I have to shut down VB6 and start over.  I can't seem to get it to release the resources properly.  Here's my code:

Public objCallNotificationEvent As ITCallNotificationEvent
Public gobjReceivedCallInfo As ITCallInfo
Public objCallControl As ITBasicCallControl
Public gobjTAPIRegToken As Long
Public gobjAddress As ITAddress
Public objCollAddresses As ITCollection
Public gobjTAPI As New TAPI
Public WithEvents gobjTAPIWithEvents As TAPI

Const TAPI3_CALL_EVENTS = _
  TE_CALLMEDIA Or _
  TE_CALLNOTIFICATION Or _
  TE_CALLSTATE Or _
  TE_DIGITEVENT
 
Private Sub Form_Load()
  gobjTAPI.Initialize
  Set objCollAddresses = gobjTAPI.Addresses
  For j = 1 To objCollAddresses.Count
    Set gobjAddress = objCollAddresses.Item(j)
    frm_Main.cmb_Address.AddItem gobjAddress.AddressName, cmb_Address.ListCount
    If gobjAddress.AddressName = GetSetting("IVR", "Config", "Address") Then
      frm_Main.cmb_Address.ListIndex = j - 1
    End If
  Next j
  gobjTAPI.EventFilter = TAPI3_CALL_EVENTS
  Set gobjTAPIWithEvents = gobjTAPI
  gobjTAPIRegToken = gobjTAPI.RegisterCallNotifications(gobjAddress, False, True, TAPIMEDIATYPE_AUDIO, 1)
End Sub

Private Sub Form_Unload(Cancel As Integer)
  objCallControl.Disconnect DC_NORMAL
  gobjTAPI.UnregisterNotifications gobjTAPIRegToken
  gobjTAPI.Shutdown
End Sub

Private Sub gobjTAPIWithEvents_Event(ByVal TapiEvent As TAPI3Lib.TAPI_EVENT, ByVal pEvent As Object)
  If TapiEvent = TE_CALLNOTIFICATION Then
    Set objCallNotificationEvent = pEvent
    Set gobjReceivedCallInfo = objCallNotificationEvent.Call
    Set objCallControl = gobjReceivedCallInfo
    tim_CID.Enabled = True
    objCallControl.Answer
  End If
  If TapiEvent = TE_CALLSTATE Then
    Set gobjReceivedCallInfo = objCallNotificationEvent.Call
    Set objCallControl = gobjReceivedCallInfo
    Debug.Print "CALL STATE: " & gobjReceivedCallInfo.CallState
    If gobjReceivedCallInfo.CallState = 3 Then
      On Error Resume Next
      objCallControl.Disconnect DC_NORMAL
      On Error GoTo 0
      Set gobjReceivedCallInfo = Nothing
      Set objCallControl = Nothing
      Set objCallNotificationEvent = Nothing
    End If
  End If
End Sub

Private Sub tim_CID_Timer()
  If lbl_CID.Caption > "" Then
    tim_CID.Enabled = False
    Exit Sub
  End If
  On Error Resume Next
  a$ = gobjReceivedCallInfo.CallInfoString(CIS_CALLERIDNAME)
  b$ = gobjReceivedCallInfo.CallInfoString(CIS_CALLERIDNUMBER)
  lbl_CID.Caption = a$ + vbCrLf + b$
  On Error GoTo 0
End Sub



Could somebody advise me on how to reset my universe so the next call will function properly?  FYI, the modem I am using shows up as the following on XP Pro:

Conexant SmartSCM External PnP, V.90, K56Flex,Voice,Speakerphone

Thanks in advance!!!
~Joel
DaeriminAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MaritimerCommented:
Just tagging along to learn something new......
0
DanAvniCTOCommented:
if you are into investing some money i would recommend the vbvoice (http://www.pronexus.com/tools/vbvoice.html) it is a complete toolkit for TAPI with alot of features.
0
CleanupPingCommented:
Daerimin:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
DanRollinsCommented:
Daerimin, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

DanRollins -- EE database cleanup volunteer
0
YensidModCommented:
Question is PAQ'd and no points refunded.

YensidMod
Community Support Moderator @Experts Exchange
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.