this is the code i have written: push 0 push offset bread push 4 push lastread push fhand call ReadFile the handle is correct cos i used it for other stuff and they work. the function is definitely failing cos i did a cmp eax,0 i want to read 4 bytes. it compiles ok and as far as i can see there is nothing wrong. this is really pissing me off. and if you could tell me how to tell it to read the file in a certain place i would be grateful. i have looked in win32.hlp but it says nothing. its pretty lame. thx alot.
Posted on 2001-03-28 11:42:00 by stupid_newb
Win32.hlp states:
BOOL ReadFile( HANDLE hFile, // handle of file to read LPVOID lpBuffer, // address of buffer that receives data DWORD nNumberOfBytesToRead, // number of bytes to read LPDWORD lpNumberOfBytesRead, // address of number of bytes read LPOVERLAPPED lpOverlapped // address of structure for data );
You seem to be passing "lastread", the API expects the address of some buffer. Is lastread an address? Mirno
Posted on 2001-03-28 11:50:00 by Mirno
aha thx. its just me being stupid i missed out the offset :) lol but now the value in lastread is "|" does this mean it is the wrong format? how do i get it to the right one???
Posted on 2001-03-28 11:58:00 by skud
i have this working now. thanks umbongo :)
Posted on 2001-03-29 13:15:00 by skud