From 933ec6aa9ce4cfb8dc7e7c97153ea85b778a5657 Mon Sep 17 00:00:00 2001 From: Hiram Chirino Date: Thu, 23 Aug 2012 17:08:20 -0400 Subject: [PATCH] Expose the CreateHardLinkW windows API call. --- .../main/java/org/fusesource/leveldbjni/internal/Util.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/leveldbjni/src/main/java/org/fusesource/leveldbjni/internal/Util.java b/leveldbjni/src/main/java/org/fusesource/leveldbjni/internal/Util.java index 83b375b..143e743 100644 --- a/leveldbjni/src/main/java/org/fusesource/leveldbjni/internal/Util.java +++ b/leveldbjni/src/main/java/org/fusesource/leveldbjni/internal/Util.java @@ -40,6 +40,7 @@ import static org.fusesource.hawtjni.runtime.ClassFlag.CPP; import static org.fusesource.hawtjni.runtime.MethodFlag.CONSTANT_GETTER; +import static org.fusesource.hawtjni.runtime.ArgFlag.*; /** * Some miscellaneous utility functions. @@ -60,6 +61,12 @@ static final native int link( @JniArg(cast="const char*") String source, @JniArg(cast="const char*") String target); + @JniMethod(conditional="defined(_WIN32) || defined(_WIN64)") + static final native int CreateHardLinkW( + @JniArg(cast="LPCTSTR", flags={POINTER_ARG, UNICODE}) String source, + @JniArg(cast="LPCTSTR", flags={POINTER_ARG, UNICODE}) String target, + @JniArg(cast="LPSECURITY_ATTRIBUTES", flags={POINTER_ARG}) long lpSecurityAttributes); + @JniMethod(flags={CONSTANT_GETTER}) public static final native int errno();