Roswellr Posted May 26, 2007 Posted May 26, 2007 Can anyone give me a little help, im trying to use CreateFileW api from the kernel32.dll heres what i use: $s = DllCall("kernel32.dll", "dword", "CreateFileW", "wstr", $sFilename, "dword", $access, "dword", $sharing, "dword", $sa, "dword", $creation, "dword", $attributes, "dword", $template) Where $sFilename = "C:\sometext.txt" $access = $FILE_ACCESS_STDRIGHTSALL = 0x1F0000 $sharing = $FILE_SHARE_READWRITE = 3 $sa = 0 $creation = $FILE_MODE_OPENEXISTING = 3 $attributes = BitOR($FILE_FLAGS_BACKUPSEMANTICS, $FILE_FLAGS_SEQUENTIALSCAN) = 0x2000000 | 0x8000000 $template = 0 I cant seem to get any numerical value returned by $s Any help appreciated, I just cant quiet grasp the whole DLLCall feature and why its not working.
Siao Posted May 26, 2007 Posted May 26, 2007 (edited) DllCall returns an array. So to access CreateFileW return value use $s[0] Edited May 26, 2007 by Siao "be smart, drink your wine"
Roswellr Posted May 26, 2007 Author Posted May 26, 2007 Thanks a bunch, missed the section below the Data Types in the help file.
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