File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2105,18 +2105,20 @@ DLL_EXPORT void w32_init_hostinfo( HOST_INFO* pHostInfo )
21052105
21062106 if (hMod )
21072107 {
2108- typedef PWSTR (* BFSPROC )( PCWSTR );
2109-
2110- BFSPROC pfnBrandingFormatString =
2111- (BFSPROC ) GetProcAddress ( hMod , "BrandingFormatString" );
2108+ FARPROC pfnBrandingFormatString =
2109+ GetProcAddress ( hMod , "BrandingFormatString" );
21122110
21132111 if (pfnBrandingFormatString )
21142112 {
21152113 // BrandingFormatString's format codes are undocumented. The
21162114 // only place I could find them anywhere was on this web page:
21172115 // https://dennisbabkin.com/blog/?t=how-to-tell-the-real-version-of-windows-your-app-is-running-on
21182116
2119- PWSTR pwstrOSName = pfnBrandingFormatString ( L"%WINDOWS_LONG%" );
2117+ // The "BrandingFormatString" function always takes a WIDE string
2118+ // argument and always returns a WIDE string result too, for BOTH
2119+ // the 32-bit and 64-bit versions of windbrand.dll.
2120+
2121+ PWSTR pwstrOSName = (PWSTR ) pfnBrandingFormatString ( L"%WINDOWS_LONG%" );
21202122
21212123 if (pwstrOSName )
21222124 {
You can’t perform that action at this time.
0 commit comments