[vlc-devel] [vlc-commits] winvlc: use WCHAR instead of TCHAR

Jean-Baptiste Kempf jb at videolan.org
Wed Apr 3 13:22:50 CEST 2019


This is incorrect.
The variable is used before on RegOpenKeyEx.

You should use FromT and keep TCHAR.


On Wed, 3 Apr 2019, at 09:56, Steve Lhomme wrote:
> vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Apr  3 
> 08:44:31 2019 +0200| [cd61b872fc847e9122f4c59a59c6f16fe4674259] | 
> committer: Steve Lhomme
> 
> winvlc: use WCHAR instead of TCHAR
> 
> We were already using FromWide on this variable. It cannot work if TCHAR is
> not wide.
> 
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cd61b872fc847e9122f4c59a59c6f16fe4674259
> ---
> 
>  bin/winvlc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/bin/winvlc.c b/bin/winvlc.c
> index 5634ce7957..d2766d0321 100644
> --- a/bin/winvlc.c
> +++ b/bin/winvlc.c
> @@ -227,7 +227,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE 
> hPrevInstance,
>          if( RegOpenKeyEx( HKEY_CURRENT_USER, 
> TEXT("Software\\VideoLAN\\VLC\\"), 0, KEY_READ, &h_key )
>                  == ERROR_SUCCESS )
>          {
> -            TCHAR szData[256];
> +            WCHAR szData[256];
>              DWORD len = 256;
>              if( RegQueryValueEx( h_key, TEXT("Lang"), NULL, NULL, 
> (LPBYTE) &szData, &len ) == ERROR_SUCCESS )
>                  lang = FromWide( szData );
> 
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits
>

-- 
Jean-Baptiste Kempf -  President
+33 672 704 734


More information about the vlc-devel mailing list