File_ReadFileToMemoryW
Reads a disk file into memory and returns the address and length in two QWORD variables. This is the Unicode version of File_ReadFileToMemory, File_ReadFileToMemoryA is the Ansi version.
File_ReadFileToMemoryW PROTO lpszFilename:QWORD, lpqwMemory:QWORD, lpqwMemoryLength:QWORD
Parameters
lpszFilename- The zero terminated file name to open and read into memory.lpqwMemory- The address of the QWORD variable that receives the starting address of the buffer, for the file contents.lpqwMemoryLength- The address of the QWORD variable that receives the number of bytes written to the memory buffer.
Returns
The return value is zero on error, otherwise non-zero.
Notes
The memory address written to lpqwMemory must be deallocated using the GlobalFree function, once the memory buffer is no longer required.
This function as based on the MASM32 Library function: read_disk_fileW
See Also
File_ReadFileToMemoryA, File_WriteMemoryToFileA, File_WriteMemoryToFileW, File_OpenW, File_Read, File_FileSize, File_Close, Memory_Alloc