|
|
|
17.11.2008 17:42 |
nalan lee |
Hi, I have developed a simple TSP by implementing some basic TSPIs (e.g. lineOpen, lineClose ...). I impelemented another simple TAPI program to open line devices of my TSP and it works. All TSPI interface implementations always return 0 in my TSP. Then I changed the program a little, and make the TSP returns 0x80000044 (LINEERR_NOMEM) in TSPI_LineClose, however, my TAPI program still gets success. I could not figure out the issue here, it seems TAPI server will not just pass the return value got from TSP?
Best Regards, Nalan
|
 |
|
|
|
|
17.11.2008 12:58 |
Andreas Marschall [MVP TAPI] |
"nalan lee" schrieb im Newsbeitrag news:BDB7213D-F60B-4BD9-AA26-38CD96C71F0A@microsoft.com... > I have developed a simple TSP by implementing some basic TSPIs (e.g. > lineOpen, lineClose ...). I impelemented another simple TAPI program to open > line devices of my TSP and it works. All TSPI interface implementations > always return 0 in my TSP.
Nalan, please note that asynchronous TSPI functions (like TSPI_lineMakeCall) need to return the dwRequestID (not 0) synchronously on success. The final result of the operation is signalled via ASYNC_COMPLETION message. See my TAPI and TSPI FAQ: Q: Is there something special with asynchronous functions in TAPI2 ? http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Is_there_6
> Then I changed the program a little, and make the TSP returns 0x80000044 > (LINEERR_NOMEM) in TSPI_LineClose, however, my TAPI program still gets > success.
Why do you want to return LINEERR_NOMEM from TSPI_LineClose() ?
> I could not figure out the issue here, it seems TAPI server will not just > pass the return value got from TSP?
There is no on to one relation between TSPI and TAPI and its functions / messages. TAPI lineClose() doesn't get the return code from TSPI_lineClose() since TAPISRV doesn't necessarily need to call TSPI_lineClose() when a TAPI app called lineClose(). Only *after* the last TAPI app does a lineClose() on a device then TSPI_lineClose() is called.
-- Best Regards Andreas Marschall Microsoft MVP for TAPI / Windows SDK / Visual C++ TAPI / TSP Developer and Tester My TAPI and TSPI FAQ: http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm My Toto® Tools (a collection of free, mostly TAPI related tools): http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http://www.frappr.com/TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the discussion. Private mail is usually not replied to. * This posting is provided "AS IS" with no warranties, and confers no rights.
|
 |
|
|
|
|
19.11.2008 01:42 |
nalan lee |
Thanks very much! I understand that async TSPI functions return the final results in the upcoming asynchronous responses. I made my TSP return NOMEM only because I want to validate if TAPISRV uses the return code of corresponding TSPI implementation. From your answer I know there is no 1-1 mapping there.
"Andreas Marschall [MVP TAPI]" wrote in message news:uH7vVvKSJHA.3300@TK2MSFTNGP02.phx.gbl... > "nalan lee" schrieb im Newsbeitrag > news:BDB7213D-F60B-4BD9-AA26-38CD96C71F0A@microsoft.com... >> I have developed a simple TSP by implementing some basic TSPIs (e.g. >> lineOpen, lineClose ...). I impelemented another simple TAPI program to >> open >> line devices of my TSP and it works. All TSPI interface implementations >> always return 0 in my TSP. > > Nalan, > please note that asynchronous TSPI functions (like TSPI_lineMakeCall) need > to > return the dwRequestID (not 0) synchronously on success. > The final result of the operation is signalled via ASYNC_COMPLETION > message. > See my TAPI and TSPI FAQ: > Q: Is there something special with asynchronous functions in TAPI2 ? > http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Is_there_6 > > >> Then I changed the program a little, and make the TSP returns 0x80000044 >> (LINEERR_NOMEM) in TSPI_LineClose, however, my TAPI program still gets >> success. > > Why do you want to return LINEERR_NOMEM from TSPI_LineClose() ? > > >> I could not figure out the issue here, it seems TAPI server will not just >> pass the return value got from TSP? > > There is no on to one relation between TSPI and TAPI and its functions / > messages. > TAPI lineClose() doesn't get the return code from TSPI_lineClose() since > TAPISRV doesn't necessarily need to call TSPI_lineClose() when a TAPI app > called lineClose(). Only *after* the last TAPI app does a lineClose() on a > device then TSPI_lineClose() is called. > > -- > Best Regards > Andreas Marschall > Microsoft MVP for TAPI / Windows SDK / Visual C++ > TAPI / TSP Developer and Tester > My TAPI and TSPI FAQ: > http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm > My Toto?Tools (a collection of free, mostly TAPI related tools): > http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm > TAPI development around the world (Frappr! map): > http://www.frappr.com/TAPIaroundTheWorld > * Please post all messages and replies to the newsgroup so all may > * benefit from the discussion. Private mail is usually not replied to. > * This posting is provided "AS IS" with no warranties, and confers no > rights. > > >
|
 |
|
|
|
|
19.11.2008 04:08 |
Andreas Marschall [MVP TAPI] |
"nalan lee" schrieb im Newsbeitrag news:580B75B9-BD57-4FCB-9F36-A92279335EF5@microsoft.com... > Thanks very much!
Nalan,you are welcome.
> I understand that async TSPI functions return the final results in the > upcoming asynchronous responses. > I made my TSP return NOMEM only because I want to validate if TAPISRV uses > the return code of corresponding TSPI implementation. > From your answer I know there is no 1-1 mapping there.
If you just want to test the error return code processing in TAPISRV, I suggest using (TSPI_)lineMakeCall for this. There you should see the (synchronous) error return code from TSPI_lineMakeCall() from your TSP as error return code for lineMakeCall() in the calling TAPI app.
You may want to try it with MS TAPI Browser TB20 and/or with JulMar Phone.exe, a TAPI test tool that is available with open source (TAPI2, C++): http://www.julmar.com/tapi/
See my TAPI and TSPI FAQ:
Q: Where can I download TAPI Browser ? http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Where_can
Q: Is there a user guide available for TAPI Browser TB20 ? http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Is_there_1
-- Best Regards Andreas Marschall Microsoft MVP for TAPI / Windows SDK / Visual C++ TAPI / TSP Developer and Tester My TAPI and TSPI FAQ: http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm My Toto? Tools (a collection of free, mostly TAPI related tools): http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm TAPI development around the world (Frappr! map): http://www.frappr.com/TAPIaroundTheWorld * Please post all messages and replies to the newsgroup so all may * benefit from the discussion. Private mail is usually not replied to. * This posting is provided "AS IS" with no warranties, and confers no rights.
|
 |
|