在VC用MultiByteToWideChar()转成Unicode,在VB得到的为什么只有第一个字符,VC里是正确的呀

解决方案 »

  1.   

    http://topic.csdn.net/t/20030805/11/2110002.html
      

  2.   

    在VB里不能再去转了,因为VC的DLL是有界面的
      

  3.   

    VB 声明 dll 的函数时参数不能用字符串,VB 默认外部函数的字符串都是 Ansi 类型,并且调用时自动进行 Ansi-Unicode 转换。
    必须声明为指针类型(Long),以避免自动 Ansi-Unicode 转换。
    declare sub GetString(byval lpStr as long, byval Count as long)dim str as string
    str = Space(256)
    GetString StrPtr(str), 256
    debug.print str
      

  4.   

    http://support.microsoft.com/kb/187912