共用方式為


GetDeviceAgentTransport

更新:2007 年 11 月

動態建立裝置代理程式執行個體 (Instance),其型別會實作 IDeviceAgentTransport 介面。

HRESULT GetDeviceAgentTransport(IDeviceAgentTransport **out_pTransport);

參數

備註

請使用 IDeviceAgentTransport 接受從裝置到開發電腦的連接,並建立相同方向的資料流。

範例

這個範例會以動態方式建立 IDeviceAgentTransport 的執行個體。如需完整的範例,請參閱IDeviceAgentTransport

// Load the Device Agent Transport Library
HINSTANCE hmod;
hmod = LoadLibrary(L"DeviceAgentTransport.dll");

// Get an instance of IDeviceAgentTransport
GetDeviceAgentTransportFunc f1 = (GetDeviceAgentTransportFunc)
    ::GetProcAddress(hmod, L"GetDeviceAgentTransport");
IDeviceAgentTransport *pTransport = NULL;
f1(&pTransport);

Managed 對應項

DeviceAgentTransportFactory.GetAgentTransport

需求

DeviceAgentTransport.h

請參閱

其他資源

Unmanaged 裝置端智慧型裝置連接 API