Link to home
Start Free TrialLog in
Avatar of dagan
dagan

asked on

TAPI application: problem disconnecting line

Hi & Thanks for the time,
I am writing an application which should call and play wave files to one or more recipients (an Alert system).
The first call is placed fine but then the line remains busy even after all cleanups and i cannot go on to further calls.
I am using TAPI funcs and waveOut... funcs. In the cleanup I basically do:
CloseHandle( m_hComm );
lineDrop( m_hCall, NULL, 0 );
lineDeallocateCall( (HCALL)m_dwDevice );
lineClose( m_hLine );
Avatar of jhance
jhance

Two ideas:

1) Are you checking for error conditions on each of the calls you are listing above?

2) Are you calling lineShutdown() ?
Avatar of dagan

ASKER

error conditions are checked.
lineShutdown() !!!
That must be it (I sure hope so)
How did I miss it?!
Now I'll just restart the computer to set the line free and check if it works.
If so, you've got your points

thanks anyway
Avatar of dagan

ASKER

Hi,
I just saw that my previuos rejection was not sent... ehmmm...
Unfortunately it was not one of the proposed answers, nor hardware problem. I've got a brand new modem and it acts the same (except that I dont need to RESTART the computer every time)
Anyway, I now also shutdown the line...

Any ideas???

thanks,
     
     Dagan
In that case, you are leaving a handle open somewhere.  TAPI can make multiple calls without rebooting, that is a known fact.

You say you are calling all of the above functions in cleanup but I'd bet that you are missing at least one of them and don't realize it.

One technique that is useful is to wrap each of the open/close functions in another function that keeps track of allocation/deallocation.

At this point, I can't offer much more due to the little amount of information you've provided.  In other words, the obvious problems are checked.  Now you need to be more detailed.  Post your code if you need to.
Avatar of dagan

ASKER

EURECA!!!
I have found it, how foolish...
(my only excuse is that I am a TAPI beginner... still)
Anyway, since I am now in a good mood, I'll give away my points, jhance - after all you DID help and waste some precious time...
Everybody !!! this round of drinks is on me!!!

thanks,

BTW - the problem was that I didn't close the wave device, once upon a WOM_DONE message caught, before all other cleanup stuff.

ooopppsss.. if you might just send a proposed answer I can accept, it could be great.
(( "jhance has proposed an answer:
Try to close the wave device..." ))
ASKER CERTIFIED SOLUTION
Avatar of jhance
jhance

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial