Am using the following code:: but bool variable returns 0.

hMcFile=(HANDLE)(file.handle());

bRet = ReadFile( hMcFile,
buffer + sizeof(ATA_PASS_THROUGH_EX),
segFileSize,
&actualBytes,
NULL);