線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1837
推到 Plurk!
推到 Facebook!

請問如何中斷已連線之網路磁碟機

尚未結案
wll0904
一般會員


發表:5
回覆:5
積分:2
註冊:2003-05-28

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-06-20 16:10:57 IP:211.21.xxx.xxx 未訂閱
我在程式開啟時使用TNetResource連上網路磁碟機,但如何在程式結束時中斷網路磁碟機?
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-06-20 16:26:47 IP:202.39.xxx.xxx 未訂閱
ex: Windows.WNetCancelConnection2('e:', 0, false);    連線:  WNetGetConnection 斷線: WNetCancelConnection2 恢復連線:  WNetAddConnection2    --- 每個人都是一本書 發表人 - hagar 於 2003/06/20 16:29:10
wll0904
一般會員


發表:5
回覆:5
積分:2
註冊:2003-05-28

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-06-23 08:45:56 IP:211.21.xxx.xxx 未訂閱
謝謝,已可以斷線了! 可否再請問一下,連線與恢復連線之使用時機為何(有何差異)?
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-06-23 09:01:18 IP:202.39.xxx.xxx 未訂閱
查了一下 help,  WNetAddConnection: The WNetAddConnection function enables the calling application to connect a local device to a network resource. A successful connection is persistent, meaning that Windows automatically restores the connection during subsequent logon operations. This function is provided for compatibility with earlier versions of Microsoft Windows. For new applications, use the NetAddConnection2 function. WNetAddConnection2 The WNetAddConnection2 function makes a connection to a network resource. The function can redirect a local device to the network resource. The WNetAddConnection2 function supersedes the WNetAddConnection function. If you pass a handle to a window that the provider of network resources can use as an owner window for dialog boxes, use the WNetAddConnection3 function. WNetAddConnection3 The WNetAddConnection3 function makes a connection to a network resource. The function can redirect a local device to the network resource. The WNetAddConnection3 function is similar to the WNetAddConnection2 function. The main difference is that WNetAddConnection3 has an additional parameter, a handle to a window that the provider of network resources can use as an owner window for dialog boxes. --- 每個人都是一本書
wll0904
一般會員


發表:5
回覆:5
積分:2
註冊:2003-05-28

發送簡訊給我
#5 引用回覆 回覆 發表時間:2003-06-23 09:29:38 IP:211.21.xxx.xxx 未訂閱
謝謝
系統時間:2024-06-27 1:06:37
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!