I try them on both x32 and x64 platforms. The MOVEFILE_DESCRIPTOR works only
on x32 and MOVE_FILE_DATA works on both. I makes sense that MOVE_FILE_DATA
is the right choice, since it is from ddk. But why MOVEFILE_DESCRIPTOR works
on x32 platform? The “Reserved” field makes the two structs ABSOLUTELY
different!
I try them on both x32 and x64 platforms. The MOVEFILE_DESCRIPTOR
works only
on x32 and MOVE_FILE_DATA works on both. I makes sense that
MOVE_FILE_DATA is
the right choice, since it is from ddk. But why MOVEFILE_DESCRIPTOR
works on
x32 platform? The “Reserved” field makes the two structs ABSOLUTELY
different!
Not necessarily. If the compiler aligns everything to a LARGE_INTEGER
boundary then the two structures will be exactly the same in terms of
byte offset. Could x64 be aligning to LARGE_INTEGER boundary?
Try printing out the sizeof() of both structs in both cases.