# Re: 关于.ini的存取

Posted by 小v on July 31, 1999 at 09:12:05:

In Reply to: 关于.ini的存取 posted by CC on July 31, 1999 at 00:56:41:

: 我使用
: buff = String(255, 0)
: ret = GetPrivateProfileString("SessionName", "DbPath", "DbPath", buff, 256, "test.ini")
: txtPath=buff

: 结果发现:
: 之后无法再串任何字给txtPath,
: 也就是txtPath=txtPath & "test"
: "test"并无法并到txtPath...

: 请问有无解答?谢谢!

传回值buff字串中是以chr(0)为结束符号, 你必须将该字元拿掉之后才能串起来!

buff=mid(buff,1, instr(buff,chr(0))-1)

Follow Ups:

- Re: 关于.ini的存取 琏琏 12:05:23 7/31/99 (0)