更新:2007 年 11 月
定义关闭回调对象必须实现的方法。
命名空间: Microsoft.SmartDevice.DeviceAgentTransport
程序集: Microsoft.SmartDevice.DeviceAgentTransport(在 Microsoft.SmartDevice.DeviceAgentTransport.dll 中)
语法
声明
<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
备注
只要设备上正在运行 conmanclient2.exe,设备代理就非常有用。当 conmanclient2.exe 关闭时,所有的设备代理也将关闭。设备代理可以请求接收关闭通知,以便正常执行清理和退出操作。为了接收关闭通知,设备代理必须定义实现此接口的类并使用 IDeviceAgentTransport.RegisterShutdownCallback 注册该类。
示例
' 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
}
}