• C

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 );
daganAsked:
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.

jhanceCommented:
Two ideas:

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

2) Are you calling lineShutdown() ?
0
daganAuthor Commented:
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
0
daganAuthor Commented:
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
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

jhanceCommented:
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.
0
daganAuthor Commented:
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..." ))
0
jhanceCommented:
Thanks and I'm glad you found the problem...
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
C

From novice to tech pro — start learning today.