将包含有null结尾的字符串转换为vb字符串_visualbasic教程
来源:作者: 发布时间:2007-12-19 10:03:55

在VB编程调用WindowsAPI函数时,经常会碰到以Null结尾的字符串,下面是一段将Null结尾字符串转换到VB字符串的函数: PublicFunctionLPSTRToVBString$(ByVals$) Dimnullpos& nullpos&=InStr(s$,Chr$(0)) Ifnullpos>0Then LPSTRToVBString=Left$(s$,nullpos-1) Else LPSTRToVBString="" EndIf EndFunction->
|
还没有关于此文章的相关评论!