Permalink
Browse files

Expose the CreateHardLinkW windows API call.

  • Loading branch information...
1 parent c821853 commit 933ec6aa9ce4cfb8dc7e7c97153ea85b778a5657 @chirino chirino committed Aug 23, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 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();

0 comments on commit 933ec6a

Please sign in to comment.