Jump to content

CreateFileW API


Recommended Posts

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.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...