DirectX SDK

Unicode vs. ANSI Interfaces

[Visual Basic]

This topic applies only to applications written in C++.

[C++]

DirectPlay supports both Unicode and ANSI strings by defining string pointers in a structure as the union of a Unicode string pointer (LPWSTR) and an ANSI string pointer (LPSTR). The two string pointers have different names. Typically, the ANSI member ends with the letter "A". Depending on which DirectPlay interface is chosen (IDirectPlay4 for Unicode or IDirectPlay4A for ANSI), or which DirectPlayLobby interface is chosen (IDirectPlayLobby3 for Unicode or IDirectPlayLobby3A for ANSI), the application should read and write the strings from the appropriate structure and ignore the other one.