标签:
D7下的函数:PWideChar转PAnsichar的 function WCharToChar(WString: PWideChar): string; var Len, dwMinSize: Integer; lpUsedDefaultChar: BOOL; begin Result := ‘‘; lpUsedDefaultChar := False; len := lstrlenW(WString) * 2 + 1; SetLength(Result, Len); dwMinSize := WideCharToMultiByte(CP_OEMCP, 0, WString, -1, nil, 0, nil, @lpUsedDefaultChar); if(len < dwMinSize) then Exit; WideCharToMultiByte(CP_OEMCP, 0, WString, -1, PAnsiChar(Result), len, nil, @lpUsedDefaultChar); end;
标签:
原文地址:http://www.cnblogs.com/moonwind/p/4423121.html