Re: data call:readfile on pocketPC2003
- From: "Grant Schenck" <schenckg@xxxxxxxxxxxxx>
- Date: Fri, 10 Feb 2006 09:20:02 -0500
If you are a Windows app then you may want to use the simple call back.
If not then you probably need to think about some kind of threading.
Specifically, you might have a main event thread. When, for example a call
presents as offering, you call TAPI's lineAnswer() and hopefully the TSP
quickly returns and indicates that the request was accepted and will
complete asyncronously. You save the request ID and any context state
information you need. You then go back to sleep waiting for the next TAPI
events or requests from some kind of foreground thread. When an event
arrives, if it is a LINE_REPLY you look up the request ID and based the
result handle appropriately.
As I say, if you are a windows app and especially if you are only handling a
single line then using the hidden window call back notification mechansim
then you can just respond to the call offering event by answering the call,
saving the request ID and returning to the win proc. Your UI and TAPI will
all just work without any data sharing or threading issues.
--
Grant Schenck
http://grantschenck.tripod.com
"mak" <McDevil80@xxxxxxxxx> wrote in message
news:1139564110.621873.232640@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
if I want to change the loop with lineanswer checking line_reply
message to be sure the function works fine,how can I do?
I'm using event notification instead of callback function, so:
1. Lineanswer
2. ret = waitforsingleobject()
3.if(ret == WAIT_OBJECT)
4. lineGetMessage(g_hLineApp,&msg,timeout);
5. if (msg.dwParam1 == LINE_REPLY)
6. ......
is that the right sequence to use?I didn't understand WHERE a
line_reply message is placed after lineanswer finished.
thanks to all
marco
.
- Follow-Ups:
- Re: data call:readfile on pocketPC2003
- From: mak
- Re: data call:readfile on pocketPC2003
- References:
- data call:readfile on pocketPC2003
- From: mak
- Re: data call:readfile on pocketPC2003
- From: Matthias Moetje [MVP]
- Re: data call:readfile on pocketPC2003
- From: mak
- Re: data call:readfile on pocketPC2003
- From: mak
- Re: data call:readfile on pocketPC2003
- From: Andreas Marschall [MVP TAPI]
- Re: data call:readfile on pocketPC2003
- From: mak
- data call:readfile on pocketPC2003
- Prev by Date: Re: Qustion about modem
- Next by Date: Re: Device Unique identifier (TAPI 3.1)
- Previous by thread: Re: data call:readfile on pocketPC2003
- Next by thread: Re: data call:readfile on pocketPC2003
- Index(es):
Relevant Pages
|