Motorola SYMBOL MINISCAN MSXX04 Guía de usuario Pagina 217

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 278
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 216
Chapter 19: Wireless Wide-Area Networking
Closing WWAN
205
Psion Mobile Devices Developers Guide
19.6 Closing WWAN
When an application has finished using the WWAN interface, the WWAN interface must be closed. It is
essential that the interface is closed before the application exits.
wwanReadyStatePtr);
if (retVal == WwanRequestStatus.NotInitialized)
{
if (WirelessWAN.Initialize() != WwanRequestStatus.Success)
{
return false;
}
}
int count = 60;
while (count > 0)
{
Thread.Sleep(1000);
// Get the ready state again....
retVal = WirelessWAN.GetReadyState(wwanParameters, wwanReadyStatePtr);
if (
(retVal != WwanRequestStatus.Success) ||
(wwanParameters.resultCode != WwanResult.Success) ||
(wwanReadyStatePtr == null)
)
{
// Unable to get the ready state. See return value / result code for reason.
return false;
}
if ((wwanReadyStatePtr.State & WWAN_READY_STATE_FLAGS.INITIALIZED) != 0)
{
// Already in the ready state.
return true;
}
count--;
}
return false;
}
Warning: If a Shutdown call is not paired with each Initialize call, system resources are not
released or cleaned up properly, resulting in a memory leak.
// For the initialization process
// see Section 19.5.3 Initializing the WWAN Driver on page 202
if (InitializeWWANAndWait())
{
// Do WWAN work here...
// Shutdown the interface
WirelessWAN::Shutdown();
}
// For the initialization process see Section 19.5.3 Initializing the WWAN Driver on page 202
if (InitializeWWANAndWait())
{
// Do WWAN work here...
// Shutdown (clean up) the WWAN interface
WirelessWAN.Shutdown();
}
Vista de pagina 216
1 2 ... 212 213 214 215 216 217 218 219 220 221 222 ... 277 278

Comentarios a estos manuales

Sin comentarios