Re: Retrieve Dialogic Channel Properties from Dialogic TSP using TAPI2.x

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



<chandsumant@xxxxxxxxxxx> schrieb im Newsbeitrag
news:1121777137.016902.199450@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> even though initially i was getting memory exception since the
> LINEADDRESSCAPS structure was too small to hold the data returned by
> the lineGetAddressCaps call. i added some extra bytes to the
> LINEADDRESSCAPS structure to increase the buffer size and it worked.

Sumanta,
thta an possible issue with all varible size TAPI structures.
You need to set the dwTotalSize to the amount of memory that you actually
allocated (this has to be at least sizeof(structure)).
After the function returned you have to evaluate first the dwNeededSize:
if dwNeededSize > dwTotalSize
then reallocate sufficient memory, set dwTotalSize accordingly, and recall the
function.
repeat these checks until dwNeededSize <= dwTotalSize.
Only then you should proceed evaluating the structure members.
In any case only those member are valid that are located in the range from 0
to dwUsedSize bytes.

Try it with TAPI Browser TB20 before starting to code anything yourself.
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
TAPI / TSP Developer and Tester
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
* 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.



.



Relevant Pages

  • Re: User Memory Quotas
    ... > - TAPI fails (we wrote the TAPI application so we are intimate with ... > - The Webserver cannot start any perl programs to handle CGI forms. ... > - Our homebrew application cannot start any programs (we have it start ... > - Our homebrew application has higher then normal memory usage. ...
    (microsoft.public.windows.server.security)
  • Re: User Memory Quotas
    ... First we have 4 gigs of Ram and 6 gigs of Virtual Memory in 2 ... - And a homebrew application that uses TAPI heavily ... - Our homebrew application has higher then normal memory usage. ...
    (microsoft.public.windows.server.security)
  • Re: How to detect memory leak in TSP?
    ... You guys have any idea on detect memory leak that caused by specific ... Leaks Using Microsoft Visual C++" ... TAPI / TSP Developer and Tester ... * Please post all messages and replies to the group so all may ...
    (microsoft.public.win32.programmer.tapi)
  • Re: TSP memory leak
    ... memory size as part of the ouput. ... Microsoft MVP for TAPI / Windows SDK ... TAPI development around the world (Frappr! ... * Please post all messages and replies to the newsgroup so all may ...
    (microsoft.public.win32.programmer.tapi)