Sumesh wrote:
I need Phone turn off event notification i tried to register the phone event like this
err = PhnLibRegister(PhoneLibRefNum, appFileCreator,  phnPowerOff);



check once more how PhnLibRegister works (in header or docs)

/**
* @brief Register or unregister (when services == 0) an application so that notifications * from the Phone Library (Chapter 13) can be broadcasted to registered applications.
 *
 *  @param refNum:      IN:  Library reference number obtained from SysLibLoad.
 *  @param creator:     IN:  Creator ID of application registering for 
notifications
* @param services: IN: Bitfield of services for which notifications are desired. See PhnServiceClassType
 *                           for bit definitions.
* Register with a value of 0 to unregister for notifications.
 *  @retval 0 for success; otherwise failed
 **/



you don't register to event but group of events. so your parameter is completely
wrong and it doesn't register you to anything (or at least not to group which you need)



enum _PhoneServiceClassType
  {
    phnServiceVoice = 1,                /**< 0x0001 */
    phnServiceSMS = 2,                  /**< 0x0002 */
    phnServiceActivation = 4,           /**< 0x0004 */
    phnServiceData = 8,                 /**< 0x0008 */
    phnServiceIOTA = 16,                /**< 0x0010 */
        phnServiceSIMToolkit = 32,      /**< 0x0020 */
    phnServiceAFLT = 64,                /**< 0x0040 */
    phnServiceMisc = 128,               /**< 0x0080 */
        phnServiceEssentials = 256,     /**< 0x0100 */
    phnServiceMMS = 512,                /**< 0x200 */
    phnServiceWAP = 1024,               /**< 0x400 */
    phnServiceAll = phnServiceVoice | phnServiceSMS | phnServiceAFLT |
phnServiceData | phnServiceActivation | phnServiceMisc | phnServiceIOTA |
                                        phnServiceEssentials | 
phnServiceSIMToolkit | phnServiceMMS | phnServiceWAP,
    phnServiceMax = 0xFFFF              /**< Reserved. */
  };

and before you ask, no, i don't know in which group is phoneoff event

--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to