Skip to content

Commit

Permalink
Expose the CreateHardLinkW windows API call.
Browse files Browse the repository at this point in the history
  • Loading branch information
chirino committed Aug 23, 2012
1 parent c821853 commit 933ec6a
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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();

Expand Down

0 comments on commit 933ec6a

Please sign in to comment.