Hi,

this Dll function should read a file in a memory and it works fine.
But it cannot read a file by a read-only medium, e.g from cd.
What's my error ? Can you help?

Greetings, Nordwind64


invoke CreateFile,,GENERIC_READ,0,0,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0
cmp eax,0
jle halloerror
push eax
mov ebx,
add ebx,
invoke ReadFile,eax,ebx,,addr readed,0
pop eax
invoke CloseHandle,eax
mov eax,dword ptr
halloerror:
Posted on 2002-05-01 07:08:24 by Nordwind64
Hi Nordwind64

I am using:

invoke CreateFile,lpFileName,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0

and have no problems reading from CD.

KetilO
Posted on 2002-05-02 02:33:57 by KetilO
Thank you KetilO,

sorry, it was not an assembler problem, the programming language, my Dll works for, has an error...

;-))

Greetings,
Nordwind64
Posted on 2002-05-02 15:10:05 by Nordwind64