Original file type using the file signature in kernal mode file system driver

Hi,

I have a legacy file system driver i am trying to find the Original file type using the file signature (Magic number).

Is it possible to read the file signature in kernal mode ?

Can I use fopen and fread in kernal mode file system driver.

Can you provide any solutions

Thanks in advance

You have all kind of file I/O functions on kernel starting from ZwCreateFile and FltCreateFile.