X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=modules%2Frostests%2Fapitests%2Fkernel32%2FMultiByteToWideChar.c;h=a3f6e8ff469ba9a2865e7d1996ed52ed80be0bff;hp=0e2add124962fa4cc319f10903b85e3d31e552a6;hb=eee53c734be1740fdd0f3809b89540ebb7c3f124;hpb=0cdee99e055538c490c5e7874eac9932305afa37 diff --git a/modules/rostests/apitests/kernel32/MultiByteToWideChar.c b/modules/rostests/apitests/kernel32/MultiByteToWideChar.c index 0e2add12496..a3f6e8ff469 100644 --- a/modules/rostests/apitests/kernel32/MultiByteToWideChar.c +++ b/modules/rostests/apitests/kernel32/MultiByteToWideChar.c @@ -173,25 +173,26 @@ static void TestEntry(const ENTRY *pEntry) typedef NTSTATUS (WINAPI* RTLGETVERSION)(PRTL_OSVERSIONINFOW); -static OSVERSIONINFOW *GetRealOSVersion(void) +static RTL_OSVERSIONINFOW *GetRealOSVersion(void) { - static OSVERSIONINFOW osvi = { 0 }; + static RTL_OSVERSIONINFOW osvi = { 0 }; + RTL_OSVERSIONINFOW *ptr = NULL; HINSTANCE hNTDLL = LoadLibraryW(L"ntdll.dll"); + RTLGETVERSION fn; if (hNTDLL) { - RTLGETVERSION fn; fn = (RTLGETVERSION)GetProcAddress(hNTDLL, "RtlGetVersion"); if (fn) { osvi.dwOSVersionInfoSize = sizeof(osvi); if (fn(&osvi) == STATUS_SUCCESS) { - return &osvi; + ptr = &osvi; } } FreeLibrary(hNTDLL); } - return NULL; + return ptr; } static BOOL IsWin10Plus(void)