会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
gloser
导航
博客园
首页
新随笔
联系
订阅
管理
公告
糊涂问题
在写ras拨号的时把256写错为20,这个糊涂问题居然花了我半天时间,
const
int
RAS_MaxEntryName
=
256
;
const
int
RAS_MaxPhoneNumber
=
128
;
const
int
RAS_MaxCallbackNumber
=
128
;
const
int
UNLEN
=
256
;
const
int
PWLEN
=
256
;
const
int
DNLEN
=
15
;
[StructLayout(LayoutKind.Sequential, CharSet
=
CharSet.Auto)]
public
struct
RASDIALPARAMS
{
public
int
dwSize;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst
=
RAS_MaxEntryName
+
1
)]
public
string
szEntryName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst
=
RAS_MaxPhoneNumber
+
1
)]
public
string
szPhoneNumber;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst
=
RAS_MaxCallbackNumber
+
1
)]
public
string
szCallbackNumber;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst
=
UNLEN
+
1
)]
public
string
szUserName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst
=
PWLEN
+
1
)]
public
string
szPassword;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst
=
DNLEN
+
1
)]
public
string
szDomain;
public
int
dwSubEntry;
public
int
dwCallbackId;
}
posted on
2005-12-19 16:32
gloser
阅读(
438
) 评论(
1
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部