Ok, my assumption is that you're accidently setting something to directory context. Make sure that dwContextSize is set to 0. Also, always check return value, if DC_VFS_READ return -2 - it means that context could not be read (not enough memory allocated for context). In such case, dwContextSize contains wrong value.
... I'll try to redesign DC_VFS_READ & DC_VFS_WRITE structures to something more userfriendly
(just noticed how horrible they are)