vb.net 读取配置文件,求大神帮忙!急急急!!!!!
答案:2 悬赏:50
解决时间 2021-04-09 00:28
- 提问者网友:白越
- 2021-04-08 02:39
最佳答案
- 二级知识专家网友:茫然不知崩溃
- 2021-04-08 03:30
element.value
全部回答
- 1楼网友:不服输的倔强
- 2021-04-08 04:22
declare function getprivateprofilestring lib "kernel32" alias "getprivateprofilestringa" (byval lpapplicationname as string, byval lpkeyname as string, byval lpdefault as string, byval lpreturnedstring as string, byval nsize as integer, byval lpfilename as string) as integer
'api函数中long类型参数和返回类型要改为integer。
public function getini(byval section as string, byval appname as string, byval lpdefault as string, byval filename as string) as string
'dim str as string = lset(str, 256) 'lset没用过,初看一下类似left函数。再说执行lset时str参数还没定义呢,会产生运行时错误。
dim str as string = space(256)
getprivateprofilestring(section, appname, lpdefault, str, len(str), filename)
return microsoft.visualbasic.left(str, instr(str, chr(0)) - 1)
end function
我要举报
大家都在看
推荐资讯