diff src/os_mswin.c @ 30320:0763cb330a65 v9.0.0496

patch 9.0.0496: no good reason to keep supporting Windows-XP Commit: https://github.com/vim/vim/commit/27b53be3a6a340f1858bcd31233fe2efc86f8e15 Author: K.Takata <kentkt@csc.jp> Date: Sun Sep 18 12:25:49 2022 +0100 patch 9.0.0496: no good reason to keep supporting Windows-XP Problem: No good reason to keep supporting Windows-XP. Solution: Drop Windows-XP support. (Ken Takata, closes https://github.com/vim/vim/issues/11089)
author Bram Moolenaar <Bram@vim.org>
date Sun, 18 Sep 2022 13:30:05 +0200
parents f103da6ba95f
children 3365a601e73b
line wrap: on
line diff
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -1744,13 +1744,6 @@ mch_print_set_fg(long_u fgcol)
 #  include <shlobj.h>
 # endif
 
-typedef BOOL (WINAPI *pfnGetFinalPathNameByHandleW)(
-	HANDLE	hFile,
-	LPWSTR	lpszFilePath,
-	DWORD	cchFilePath,
-	DWORD	dwFlags);
-static pfnGetFinalPathNameByHandleW pGetFinalPathNameByHandleW = NULL;
-
 # define is_path_sep(c)	    ((c) == L'\\' || (c) == L'/')
 
     static int
@@ -1792,20 +1785,6 @@ resolve_reparse_point(char_u *fname)
     WCHAR	    *p, *wp;
     char_u	    *rfname = NULL;
     WCHAR	    *buff = NULL;
-    static BOOL	    loaded = FALSE;
-
-    if (pGetFinalPathNameByHandleW == NULL)
-    {
-	HMODULE hmod = GetModuleHandle("kernel32.dll");
-
-	if (loaded == TRUE)
-	    return NULL;
-	pGetFinalPathNameByHandleW = (pfnGetFinalPathNameByHandleW)
-		GetProcAddress(hmod, "GetFinalPathNameByHandleW");
-	loaded = TRUE;
-	if (pGetFinalPathNameByHandleW == NULL)
-	    return NULL;
-    }
 
     p = enc_to_utf16(fname, NULL);
     if (p == NULL)
@@ -1824,13 +1803,13 @@ resolve_reparse_point(char_u *fname)
     if (h == INVALID_HANDLE_VALUE)
 	goto fail;
 
-    size = pGetFinalPathNameByHandleW(h, NULL, 0, 0);
+    size = GetFinalPathNameByHandleW(h, NULL, 0, 0);
     if (size == 0)
 	goto fail;
     buff = ALLOC_MULT(WCHAR, size);
     if (buff == NULL)
 	goto fail;
-    if (pGetFinalPathNameByHandleW(h, buff, size, 0) == 0)
+    if (GetFinalPathNameByHandleW(h, buff, size, 0) == 0)
 	goto fail;
 
     if (wcsncmp(buff, L"\\\\?\\UNC\\", 8) == 0)