ghetek Posted July 10, 2010 Posted July 10, 2010 I am trying to create a simple code to create a symbolic link. I would like to utilize the Microsoft function within their kernel32.dll library. from what i understand there are only 3 parameters necessary, Symlink, Target, and the "dwflags". It looks like the dwflag is just a 0 or 1 that denotes a file or a directory (respectively) for the linking.Here is my code snippet so far:Func CreatePortalDLL($Entrance, $Exit) $result = DllCall("kernel32.dll", "int", "CreateSymbolicLink", "str", $Entrance, "str", $Exit, "int", 1) ConsoleWrite($result & @CRLF) EndFunc ;==>CreatePortalDLLHere is an example from microsoft in C#:[DllImport("kernel32.dll", EntryPoint="CreateSymbolicLinkW", CharSet=CharSet.Unicode)] public static extern int CreateSymbolicLink([In] string lpSymlinkFileName, [In] string lpTargetFileName, int dwFlags);Everytime that I run this I just get back a 0 as a result and there is no symbolic link created. Any ideas? Thanks in advance AutoIT community!
trancexx Posted July 10, 2010 Posted July 10, 2010 Your system? ConsoleWrite($result[0] & @CRLF) ♡♡♡ . eMyvnE
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now