TAPI lineGetAddressID() fails with LINEERR_INVALADDRESS
Posted
by PaulH
on Stack Overflow
See other posts from Stack Overflow
or by PaulH
Published on 2010-03-24T21:05:11Z
Indexed on
2010/04/18
7:33 UTC
Read the original article
Hit count: 456
I have a windows mobile 6 application using TAPI 2.0. lineGetAddressID()
is needed to get the address identifier used by several calls in the telephone api, but I can't get it to work.
I have tried the following to no avail:
HLINE line; // valid handle from lineOpen();
DWORD addr_id = 0;
result = ::lineGetAddressID( line, &addr_id, LINEADDRESSMODE_DIALABLEADDR, L"1234", 5 );
result = ::lineGetAddressID( line, &addr_id, LINEADDRESSMODE_DIALABLEADDR, L"5551234", 8 );
result = ::lineGetAddressID( line, &addr_id, LINEADDRESSMODE_DIALABLEADDR, L"1115551234", 11 );
result = ::lineGetAddressID( line, &addr_id, LINEADDRESSMODE_DIALABLEADDR, L"11115551234", 12 );
All of them return LINEERR_INVALADDRESS. Can anybody point out what I may be doing wrong?
As a side question, how can I programmaticly get the address? It appears in the LINEADDRESSCAPS structure returned by lineGetAddressCaps()
, but that requires an address identifier (which would need to come from lineGetAddressID()
, which requires an address...).
Note: I realize I could use 0 as the address ID and it will probably work, but I have no guarantee it will work for every platform. I would like to get this solved 'right'.
Thanks, PaulH
© Stack Overflow or respective owner