Be ware of Microsoft Bug in the VirtualCE File System Driver for virtual storage card emulation

Dont know a way to notify M$, so post here :)

Here is the bug : Microsoft device driver for implementing emulator virtual sharer (vcsfsd.dll –VirtualCEFileSystemDriver) has the following bug for its implementation of

DWORDSetFilePointer( HANDLEhFile,

LONGlDistanceToMove,

PLONGlpDistanceToMoveHigh,

DWORDdwMoveMethod);

It is incorrect when lDistanceToMove is negative and dwMoveMethod isFILE_END. It will interpret the minus sign incorrectly. (you can verify it easily by using this API) . Further digging reveals thatit calculates current file pointer position by using code similar to:(for FILE_END case)

CurrentPosition = FileSize – lDistanceToMove.

You see,it is wrong !!!

[6614 byte] By [JZ] at [2007-12-27]
# 1
This has been already reported - please see here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=882165&SiteID=1
MichaelKoster at 2007-9-5 > top of Msdn Tech,Smart Device Development,Device Emulator General...