'宽字符 换成 普通字符
'宽字符是指针
'WStrLen 是宽字符个数，不是字节长度
Function wStrToStr(WStrPtr as WString Ptr, WStrLen as Long = 0) as   String  
'WStrLen 是宽字符个数，不是字节长度
    If WStrPtr Then
        If WStrLen = 0 Then
            Return ""
        EndIf
       Dim ZStr as String
       ZStr=String(WStrLen*2+2,0)  
       Dim ZStrLen as Integer =  WideCharToMultiByte(CP_ACP, 0, WStrPtr, WStrLen, StrPtr(ZStr), WStrLen*2+2, Null, Null)
       If ZStrLen Then Function=Left(ZStr,ZStrLen)
    EndIf
End Function