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

如何用RAS修改撥號內容裡面的設定?

答題得分者是:harpist
SENFO
一般會員


發表:13
回覆:22
積分:7
註冊:2006-07-10

發送簡訊給我
#1 引用回覆 回覆 發表時間:2007-08-03 09:39:54 IP:218.210.xxx.xxx 訂閱
如題
我想用RAS的API去修改撥號內容裡面的設定,如圖檔,點開桌面撥號捷徑再點內容,選安全性之後點進階,進去之後如圖檔的紅色框框裡面,想要將某勾去掉或打勾,請問該如何做到呢?
附加檔案:46b2876abe95c_Dial_1.JPG
編輯記錄
SENFO 重新編輯於 2007-08-03 10:37:35, 註解 無‧
harpist
資深會員


發表:3
回覆:251
積分:430
註冊:2002-10-03

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-08-10 00:59:23 IP:59.105.xxx.xxx 未訂閱
http://msdn2.microsoft.com/EN-US/library/aa378047.aspx
透過 RAS Administration Functions 應該可行...沒試過您參考看看
------
~§~迷時師渡,悟了自渡~§~
SENFO
一般會員


發表:13
回覆:22
積分:7
註冊:2006-07-10

發送簡訊給我
#3 引用回覆 回覆 發表時間:2007-08-11 11:04:53 IP:218.210.xxx.xxx 訂閱
好像沒辦法改

===================引 用 harpist 文 章===================
http://msdn2.microsoft.com/EN-US/library/aa378047.aspx
透過 RAS Administration Functions 應該可行...沒試過您參考看看
harpist
資深會員


發表:3
回覆:251
積分:430
註冊:2002-10-03

發送簡訊給我
#4 引用回覆 回覆 發表時間:2007-08-11 22:57:31 IP:59.105.xxx.xxx 未訂閱
我沒試過,您試過了嗎?

DWORD MprAdminConnectionGetInfo(
RAS_SERVER_HANDLE hRasServer,
DWORD dwLevel,
HANDLE hConnection,
LPBYTE* lplpbBuffer
);
lplpbBuffer 可以取得 RAS_CONNECTION_2

typedef struct _RAS_CONNECTION_2 {
HANDLE hConnection;
WCHAR wszUserName[UNLEN 1];
ROUTER_INTERFACE_TYPE dwInterfaceType;
GUID guid;
PPP_INFO_2 PppInfo2;
} RAS_CONNECTION_2,
*PRAS_CONNECTION_2;

其中 PppInfo2 是 PPP_INFO_2

typedef struct _PPP_INFO_2 {
PPP_NBFCP_INFO nbf;
PPP_IPCP_INFO2 ip;
PPP_IPXCP_INFO ipx;
PPP_ATCP_INFO at;
PPP_CCP_INFO ccp;
PPP_LCP_INFO lcp;
} PPP_INFO_2;

lcp 是 PPP_LCP_INFO

typedef struct _PPP_LCP_INFO {
OUT DWORD dwError;
OUT DWORD dwAuthenticationProtocol;
OUT DWORD dwAuthenticationData;
OUT DWORD dwRemoteAuthenticationProtocol;
OUT DWORD dwRemoteAuthenticationData;
OUT DWORD dwTerminateReason;
OUT DWORD dwRemoteTerminateReason;
OUT DWORD dwOptions;
OUT DWORD dwRemoteOptions;
OUT DWORD dwEapTypeId;
OUT DWORD dwRemoteEapTypeId;
} PPP_LCP_INFO;

PPP_LCP_INFO 可能是你要的東西

Members
dwError

Specifies the error that occurred if the negotiation was unsuccessful.
dwAuthenticationProtocol
Specifies the authentication protocol used to authenticate the local computer. This member can be one of the following values. Value Meaning

PPP_LCP_PAP Password Authentication Protocol
PPP_LCP_SPAP Shiva Password Authentication Protocol
PPP_LCP_CHAP Challenge Handshake Authentication Protocol
PPP_LCP_EAP Extensible Authentication Protocol

dwAuthenticationData
Specifies additional information about the authentication protocol specified by the dwAuthenticationProtocol member. This member can be one of the following values. Value Meaning

PPP_LCP_CHAP_MD5 MD5 CHAP
PPP_LCP_CHAP_MS Microsoft CHAP
PPP_LCP_CHAP_MSV2 Microsoft CHAP version 2

dwRemoteAuthenticationProtocol
Specifies the authentication protocol used to authenticate the remote computer. See the dwAuthenticationProtocol member for a list of possible values.
dwRemoteAuthenticationData
Specifies additional information about the authentication protocol specified by dwRemoteAuthenticationProtocol. See the dwAuthenticationData member for a list of possible values.
dwTerminateReason
Specifies the reason the connection was terminated by the local computer. This member always has a value of zero.
dwRemoteTerminateReason
Specifies the reason the connection was terminated by the remote computer. This member always has a value of zero.
dwOptions
Specifies information about LCP options in use by the local computer. This member is a combination of the following flags. Flag Meaning
PPP_LCP_MULTILINK_FRAMING The connection is using multilink
RASLCPO_PFC Protocol Field Compression (see RFC 1172)
RASLCPO_ACFC Address and Control Field Compression (see RFC 1172)
RASLCPO_SSHF Short Sequence Number Header Format (see RFC 1990)
RASLCPO_DES_56 DES 56-bit encryption
RASLCPO_3_DES Triple DES Encryption

dwRemoteOptions
Specifies information about LCP options in use by the remote computer. This member is a combination of the following flags. Flag Meaning

PPP_LCP_MULTILINK_FRAMING The connection is using multilink.
RASLCPO_PFC Protocol Field Compression (see RFC 1172)
RASLCPO_ACFC Address and Control Field Compression (see RFC 1172)
RASLCPO_SSHF Short Sequence Number Header Format (see RFC 1990)
RASLCPO_DES_56 DES 56-bit encryption
RASLCPO_3_DES Triple DES Encryption

dwEapTypeId
Specifies the type identifier of the Extensible Authentication Protocol (EAP) used to authenticate the local computer. The value of this member is valid only if dwAuthenticationProtocol is PPP_LCP_EAP.
dwRemoteEapTypeId
Specifies the type identifier of the Extensible Authentication Protocol (EAP) used to authenticate the remote computer. The value of this member is valid only if dwRemoteAuthenticationProtocol is PPP_LCP_EAP.
------
~§~迷時師渡,悟了自渡~§~
編輯記錄
harpist 重新編輯於 2007-08-11 22:59:28, 註解 無‧
系統時間:2024-04-25 16:14:20
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!