Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Expose the CreateHardLinkW windows API call.

  • Loading branch information...
commit 933ec6aa9ce4cfb8dc7e7c97153ea85b778a5657 1 parent c821853
@chirino chirino authored
View
7 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();
Please sign in to comment.
Something went wrong with that request. Please try again.