Well at the moment I have not the Max help file under my nose, bu I think the problem is in the readfile(); this command should returns a handle to the file, then you need to read from that stream. You should read how ReadFile() works, then where the files is on disk on in Ram is not important.
Byez
Byez