Re: TAPI how to get the device Name

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



So what is the function of ITAddress->GetAddressName(BSTR ppName)?
that is the functon I have been using,

"Andreas Marschall [exMVP TAPI]" wrote:

"imhotep" <imhotep@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:E41B0FA5-45F9-472E-AC40-0614466E9861@xxxxxxxxxxxxxxxx
Ok, i think am getting the TAPI and VC++ now,
I would like to output the device name to the console..
but for some reason i only get the mem address or hex
am using pAddress->AddressNam(&ppName)
when I try to output ppName, I get hex or address location

imhotep,
please note that dwAddressOffset is: "Offset from the beginning of the
structure to the variably sized address field. The size of the field is
specified by dwAddressSize."

So to access the string you need to do some pointer arithmetics and type
castings:

LONG lRet = lineGetAddressCaps(,,,,,lpAddressCaps);
// check return code and process possible errors
// check if (lpAddressCaps->dwTotalSize < lpAddressCaps->dwNeededSize) and
reallcoate more memory for lpAddressCaps before retrying
lineGetAddressCaps()

char* sAddress =
(char*)(((BYTE*)lpAddressCaps)+lpAddressCaps->dwAddressOffset);
// when using sAddress it is strongly recommended to access it only upto its
valid length: lpAddressCaps->dwAddressSize bytes.

--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK / Visual C++ 2003-2008
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.




.



Relevant Pages

  • Re: Cant programmatically answer a call witch returned from CS_HOLD (TAPI3)
    ... > BSTR* ppName = CallBridge TU ... Microsoft MVP for TAPI / Windows SDK ... * Please post all messages and replies to the newsgroup so all may ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Identify call IDs
    ... Just suppose i phone someone, and it replies my phone call, my program will ... P.E, If a fax comes up, finish the call and don't save the audio. ... Microsoft MVP for TAPI / Windows SDK ... TAPI development around the world (Frappr! ...
    (microsoft.public.win32.programmer.tapi)
  • Re: TAPI how to get the device Name
    ... yes ppName is BSTR* so how I get the string for the device name? ... According to MSDN ppName is a BSTR*, ... TAPI / TSP Developer and Tester ... * Please post all messages and replies to the newsgroup so all may ...
    (microsoft.public.win32.programmer.tapi)
  • Re: RegisterCallNotifications for Multiple Modems?
    ... Only Address2_1 and Address2_2 allowed the RegisterCallNotifications. ... BSTR* ppName = CXT AC-Link Modem for Intel ... Obvious question is what happens when you test this in the MS TAPI Browser? ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Identify call IDs
    ... Just suppose i phone someone, and it replies my phone call, my program will ... P.E, If a fax comes up, finish the call and don't save the audio. ... Microsoft MVP for TAPI / Windows SDK ... TAPI development around the world (Frappr! ...
    (microsoft.public.win32.programmer.tapi)