zoukankan      html  css  js  c++  java
  • Getting device phone number using extended TAPI

    The phone number of the mobile device can be retrieved using the API lineGetAddressCaps. The API fills the LINEADDRESSCAPS structure that is passed in with information about the address capabilities of the given line. The member dwAddressOffset represents the offset from the start of the structure to the line address. The syntax of the function is:

    1 LONG WINAPI lineGetAddressCaps(HLINEAPP hLineApp,DWORD dwDeviceID,DWORD dwAddressID,DWORD dwAPIVersion,DWORD dwExtVersion,LPLINEADDRESSCAPS lpAddressCaps);

    You can copy the string using the code:

    1 WCHAR* pAddress = (WCHAR*)(((BYTE*)pAddressCaps) + pAddressCaps->dwAddressOffset);

    This will give you the phone number of the device. You have to check whether the dwAddressOffset member is zero or not. If it is non zero then the system found a phone number.

  • 相关阅读:
    [转载]Centos7.x下环境搭建(一)--yum方式安装mysql5.7
    树上分治
    [SPOJ2666]QTREE4
    [SPOJ375]QTREE
    [SPOJ1825]FTOUR2
    [POJ1741]Tree
    [LG-P5350]序列
    [COCI 2014/2015 #3]KAMIONI
    [SHOI2014]神奇化合物
    [GXOI/GZOI2019]旧词
  • 原文地址:https://www.cnblogs.com/91program/p/5234283.html
Copyright © 2011-2022 走看看