InterviewSolution
| 1. |
What Precautions Should We Take When I Invoke Inetmgr_gethostbyname() To Perform Dns Lookup? |
|
Answer» You must ensure that your app cancels its pending DNS callback, if any, using CALLBACK_Cancel() in all exit routes. This includes when the app is suspended and when the app is STOPPED (both via the End key and the Clear key). For example, if you used the FOLLOWING code to lookup a DNS address: CALLBACK_Init(&pMe->cbkLookup, GetHostByNameCB, pMe); The callback cancel code should be incorporated in the Suspend event handler code ( EVT_APP_SUSPEND), the app's FreeAppData function (which is called when the app is stopped, i.e. receives EVT_APP_STOP event), and in the Clear key event handler code (EVT_KEY and keycode AVK_CLR). Note: Please note that your app will not pass TRUE BREW TESTING if it does not properly cancel its pending DNS callback. Some symptoms that might indicate that your app is not canceling its p ending DNS callback are:,/p>
Both might imply that the previously running app did not cancel its pending DNS callback. You must ensure that your app cancels its pending DNS callback, if any, using CALLBACK_Cancel() in all exit routes. This includes when the app is suspended and when the app is stopped (both via the End key and the Clear key). For example, if you used the following code to lookup a DNS address: CALLBACK_Init(&pMe->cbkLookup, GetHostByNameCB, pMe); The callback cancel code should be incorporated in the Suspend event handler code ( EVT_APP_SUSPEND), the app's FreeAppData function (which is called when the app is stopped, i.e. receives EVT_APP_STOP event), and in the Clear key event handler code (EVT_KEY and keycode AVK_CLR). Note: Please note that your app will not pass TRUE BREW Testing if it does not properly cancel its pending DNS callback. Some symptoms that might indicate that your app is not canceling its p ending DNS callback are:,/p> Both might imply that the previously running app did not cancel its pending DNS callback. |
|