Partager via


IAgentTransportShutdownCallback, interface

Mise à jour : novembre 2007

Définit les méthodes qu'un objet de rappel d'arrêt doit implémenter.

Espace de noms :  Microsoft.SmartDevice.DeviceAgentTransport
Assembly :  Microsoft.SmartDevice.DeviceAgentTransport (dans Microsoft.SmartDevice.DeviceAgentTransport.dll)

Syntaxe

<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)> _
<GuidAttribute("1ECA6EBC-4B7A-4BA6-8516-DB38DF0045A5")> _
Public Interface IAgentTransportShutdownCallback

Dim instance As IAgentTransportShutdownCallback
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
[GuidAttribute("1ECA6EBC-4B7A-4BA6-8516-DB38DF0045A5")]
public interface IAgentTransportShutdownCallback
[InterfaceTypeAttribute(ComInterfaceType::InterfaceIsIUnknown)]
[GuidAttribute(L"1ECA6EBC-4B7A-4BA6-8516-DB38DF0045A5")]
public interface class IAgentTransportShutdownCallback
public interface IAgentTransportShutdownCallback

Notes

Un agent Smart Device est utile tant que conmanclient2.exe s'exécute sur l'appareil. Lorsque conmanclient2.exe est arrêté, tous les agents Smart Device sont également arrêtés. Un agent Smart Device peut demander à recevoir une notification d'arrêt pour effectuer un nettoyage et quitter normalement. Pour recevoir la notification d'arrêt, l'agent Smart Device doit définir une classe qui implémente cette interface, puis l'enregistrer à l'aide de IDeviceAgentTransport.RegisterShutdownCallback.

Exemples

' Define your own shutdown implementation
Class ShutdownCallback
    Implements IAgentTransportShutdownCallback

    Sub Shutdown(ByVal in_pUnknown As Object) _
        Implements IAgentTransportShutdownCallback.Shutdown

        ' Insert cleanup code here

    End Sub 'Shutdown
End Class 'ShutdownCallback
// Define your own shutdown implementation
class ShutdownCallback : IAgentTransportShutdownCallback
{
    public void Shutdown(object in_pUnknown)
    {
        // Insert cleanup code here
    }
}

Voir aussi

Référence

Membres IAgentTransportShutdownCallback

Microsoft.SmartDevice.DeviceAgentTransport, espace de noms