擷取傳輸檔案所使用的協定。 遠端檔案名稱用來識別傳輸檔案的協定。
語法
HRESULT GetProtocol(
[out] LPWSTR *pProtocol
);
參數
[out] pProtocol
包含用於傳輸檔案的協定的 null 終止字串。 字串中包含 HTTP 協定的「http」與 SMB 協定的「file」。 如果錯誤與傳輸協定無關, ppProtocol 參數會被設定為 NULL 。 完成後呼叫 CoTaskMemFree 函式來釋放 ppProtocol 。
返回值
此方法回傳以下 HRESULT 值及其他值。
| 回傳碼 | Description |
|---|---|
|
成功取得遠端檔案協定。 |
|
此錯誤與遠端檔案傳輸協定無關。 ppProtocol 參數設為 NULL。 |
需求
| Requirement | 價值觀 |
|---|---|
| 最低支援的用戶端 | 視窗XP |
| 支援的最低伺服器 | Windows Server 2003 |
| 目標平臺 | 窗戶 |
| Header | Bits.h |
| Library | Bits.lib |
| DLL | QmgrPrxy.dll |