DLL_EXPORT void __stdcall ReadFileVFS(int handle, void* buf, int length) { ASSERT(openFiles.find(handle) != openFiles.end(), "Unregistered handle. Pass the handle returned by OpenFileVFS to ReadFileVFS."); ASSERT(buf, "Don't pass a NULL pointer to ReadFileVFS."); CFileHandler* fh = openFiles[handle]; fh->Read(buf, length); }