I need to get time when hiberfil.sys was last modified to be able to distinguish if PC was woken up from hibernation or sleep mode, but my every attempt to open that file results in error 32: Sharing violation. I know that it's possible to get it's time modified stamp, since both Explorer and my other file browser return it OK. Does anyone know how to do it?

PS. I tried GetFileAttributesEx() and CreateFile(name, FILE_READ_EA, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL) and both failed.