Hi DAW,

We are in the midst of moving our ANSI WINAPI interface to UniCode, below is an example:

Code:
#IF (!@ > 191)
  External_Function GetClassName "GetClassNameW" User32.dll Handle hWnd Pointer lpsClassName Integer cbText Returns Integer
#ELSE        
  External_Function GetClassName "GetClassNameA" User32.dll Handle hWnd Pointer lpsClassName Integer cbText Returns Integer
#ENDIF


Function WinClassName Global Handle hWnd Returns String
  Integer iVoid
#IF (!@ > 191)
  WString sClassName
#ELSE
  String sClassName
#ENDIF
  Move (Repeat(Character(0), 60)) to sClassName
  Move (GetClassName(hWnd,AddressOf(sClassName),60)) to iVoid
  Function_Return (CString(sClassName))
End_Function
Is the above code the right way (best practise) or should we be using the examples in WinUser.pkg where a string to converted to a widestring pointer using the StringToWide procedure ?

Thanks.