=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: msvcp: Implement the WCHAR version of _Link.

Alexandre Julliard julliard at winehq.org
Tue Oct 10 14:41:21 CDT 2017


Module: wine
Branch: master
Commit: 96fcf4cc037c8e8fd204591c009517b55d244092
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=96fcf4cc037c8e8fd204591c009517b55d244092

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Tue Oct 10 17:09:45 2017 +0200

msvcp: Implement the WCHAR version of _Link.

Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcp120/msvcp120.spec         |  4 ++--
 dlls/msvcp120_app/msvcp120_app.spec |  4 ++--
 dlls/msvcp140/msvcp140.spec         |  2 +-
 dlls/msvcp90/ios.c                  | 14 ++++++++++++++
 4 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/dlls/msvcp120/msvcp120.spec b/dlls/msvcp120/msvcp120.spec
index 3b29e73..ae1ac57 100644
--- a/dlls/msvcp120/msvcp120.spec
+++ b/dlls/msvcp120/msvcp120.spec
@@ -1533,8 +1533,8 @@
 @ cdecl -arch=win64 ?_Launch at _Pad@std@@QEAAXPEAU_Thrd_imp_t@@@Z(ptr ptr) _Pad__Launch
 @ cdecl -arch=win32 ?_Link at sys@tr2 at std@@YAHPBD0 at Z(str str) tr2_sys__Link
 @ cdecl -arch=win64 ?_Link at sys@tr2 at std@@YAHPEBD0 at Z(str str) tr2_sys__Link
-@ stub -arch=win32 ?_Link at sys@tr2 at std@@YAHPB_W0 at Z
-@ stub -arch=win64 ?_Link at sys@tr2 at std@@YAHPEB_W0 at Z
+@ cdecl -arch=win32 ?_Link at sys@tr2 at std@@YAHPB_W0 at Z(wstr wstr) tr2_sys__Link_wchar
+@ cdecl -arch=win64 ?_Link at sys@tr2 at std@@YAHPEB_W0 at Z(wstr wstr) tr2_sys__Link_wchar
 @ cdecl -arch=win32 ?_Locimp_Addfac at _Locimp@locale at std@@CAXPAV123 at PAVfacet@23 at I@Z(ptr ptr long) locale__Locimp__Locimp_Addfac
 @ cdecl -arch=win64 ?_Locimp_Addfac at _Locimp@locale at std@@CAXPEAV123 at PEAVfacet@23 at _K@Z(ptr ptr long) locale__Locimp__Locimp_Addfac
 @ cdecl -arch=win32 ?_Locimp_ctor at _Locimp@locale at std@@CAXPAV123 at ABV123@@Z(ptr ptr) locale__Locimp__Locimp_ctor
diff --git a/dlls/msvcp120_app/msvcp120_app.spec b/dlls/msvcp120_app/msvcp120_app.spec
index 7a6dc58..56bed79 100644
--- a/dlls/msvcp120_app/msvcp120_app.spec
+++ b/dlls/msvcp120_app/msvcp120_app.spec
@@ -1533,8 +1533,8 @@
 @ cdecl -arch=win64 ?_Launch at _Pad@std@@QEAAXPEAU_Thrd_imp_t@@@Z(ptr ptr) msvcp120.?_Launch at _Pad@std@@QEAAXPEAU_Thrd_imp_t@@@Z
 @ cdecl -arch=win32 ?_Link at sys@tr2 at std@@YAHPBD0 at Z(str str) msvcp120.?_Link at sys@tr2 at std@@YAHPBD0 at Z
 @ cdecl -arch=win64 ?_Link at sys@tr2 at std@@YAHPEBD0 at Z(str str) msvcp120.?_Link at sys@tr2 at std@@YAHPEBD0 at Z
-@ stub -arch=win32 ?_Link at sys@tr2 at std@@YAHPB_W0 at Z
-@ stub -arch=win64 ?_Link at sys@tr2 at std@@YAHPEB_W0 at Z
+@ cdecl -arch=win32 ?_Link at sys@tr2 at std@@YAHPB_W0 at Z(wstr wstr) msvcp120.?_Link at sys@tr2 at std@@YAHPB_W0 at Z
+@ cdecl -arch=win64 ?_Link at sys@tr2 at std@@YAHPEB_W0 at Z(wstr wstr) msvcp120.?_Link at sys@tr2 at std@@YAHPEB_W0 at Z
 @ cdecl -arch=win32 ?_Locimp_Addfac at _Locimp@locale at std@@CAXPAV123 at PAVfacet@23 at I@Z(ptr ptr long) msvcp120.?_Locimp_Addfac at _Locimp@locale at std@@CAXPAV123 at PAVfacet@23 at I@Z
 @ cdecl -arch=win64 ?_Locimp_Addfac at _Locimp@locale at std@@CAXPEAV123 at PEAVfacet@23 at _K@Z(ptr ptr long) msvcp120.?_Locimp_Addfac at _Locimp@locale at std@@CAXPEAV123 at PEAVfacet@23 at _K@Z
 @ cdecl -arch=win32 ?_Locimp_ctor at _Locimp@locale at std@@CAXPAV123 at ABV123@@Z(ptr ptr) msvcp120.?_Locimp_ctor at _Locimp@locale at std@@CAXPAV123 at ABV123@@Z
diff --git a/dlls/msvcp140/msvcp140.spec b/dlls/msvcp140/msvcp140.spec
index 5409853..08f1ff4 100644
--- a/dlls/msvcp140/msvcp140.spec
+++ b/dlls/msvcp140/msvcp140.spec
@@ -3667,7 +3667,7 @@
 @ stub _LSinh
 @ extern _LSnan _LSnan
 @ stub _Last_write_time
-@ stub _Link
+@ cdecl _Link(wstr wstr) tr2_sys__Link_wchar
 @ cdecl _Lock_shared_ptr_spin_lock()
 @ cdecl _Lstat(wstr ptr)
 @ cdecl _Make_dir(wstr) tr2_sys__Make_dir_wchar
diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c
index c6f06ff..5d2f0ca 100644
--- a/dlls/msvcp90/ios.c
+++ b/dlls/msvcp90/ios.c
@@ -15036,6 +15036,20 @@ int __cdecl tr2_sys__Link(char const* existing_path, char const* new_path)
     return GetLastError();
 }
 
+/* ?_Link at sys@tr2 at std@@YAHPB_W0 at Z */
+/* ?_Link at sys@tr2 at std@@YAHPEB_W0 at Z */
+/* _Link */
+int __cdecl tr2_sys__Link_wchar(WCHAR const* existing_path, WCHAR const* new_path)
+{
+    TRACE("(%s %s)\n", debugstr_w(existing_path), debugstr_w(new_path));
+    if(!existing_path || !new_path)
+        return ERROR_INVALID_PARAMETER;
+
+    if(CreateHardLinkW(new_path, existing_path, NULL))
+        return ERROR_SUCCESS;
+    return GetLastError();
+}
+
 /* ?_Symlink at sys@tr2 at std@@YAHPBD0 at Z */
 /* ?_Symlink at sys@tr2 at std@@YAHPEBD0 at Z */
 int __cdecl tr2_sys__Symlink(char const* existing_file_name, char const* file_name)




More information about the wine-cvs mailing list