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.

  • 相关阅读:
    composer的使用
    tp5短信接口的使用
    PHP序列化与反序列化
    PHP 的oop思想
    php单例模式
    统计图的使用(chart)
    jq的时间插件
    php中Excel操作
    Linux 常用命令
    think cmfx目录结构
  • 原文地址:https://www.cnblogs.com/91program/p/5234283.html
Copyright © 2011-2022 走看看