| 881 | |
| 882 | |
| 883 | wchar* GetWideName(const char *Name,const wchar *NameW,wchar *DestW,size_t DestSize) |
| 884 | { |
| 885 | if (NameW!=NULL && *NameW!=0) |
| 886 | { |
| 887 | if (DestW!=NameW) |
| 888 | wcsncpy(DestW,NameW,DestSize); |
| 889 | } |
| 890 | else |
| 891 | if (Name!=NULL) |
| 892 | CharToWide(Name,DestW,DestSize); |
| 893 | else |
| 894 | *DestW=0; |
| 895 | |
| 896 | // Ensure that we return a zero terminate string for security reasons. |
| 897 | if (DestSize>0) |
| 898 | DestW[DestSize-1]=0; |
| 899 | |
| 900 | return DestW; |
| 901 | } |
| 902 | |
| 903 | |
| 904 | #ifdef _WIN_ALL |
no test coverage detected