Jump to content
Sign in to follow this  


Recommended Posts


can any of the real cracks here give me a hand and help me adjusting the code below to access a file?

#include <WinAPI.au3>

Global $output, $InputFile, $hFile, $tSize, $tBuffer, $pBuffer, $bread = 0, $filesize

$InputFile = "test.txt"

$hFile = _WinAPI_CreateFile($InputFile, 2, 2)
$filesize = _WinAPI_GetFileSizeEx($hFile)
$tBuffer = DllStructCreate("char Text[" & $filesize & "]") 
$pBuffer = DllStructGetPtr($tBuffer)
_WinAPI_ReadFile($hFile, $pBuffer, $filesize, $bread)

$output = DllStructGetData($pBuffer,"Text")


What I want is a way to access a file and read from position y to x.

Searched the forum without much success, all I came up with is the stuff above ( :) ).

Thanks in advance and cheers


This post will be edited again by Polyphem: Tomorrow, 11:55 AM

Share this post

Link to post
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
Sign in to follow this  

  • Create New...