Click here to Skip to main content
11,582,850 members (77,489 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC8.0
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);
Posted 8-Mar-11 18:46pm
Edited 8-Mar-11 19:27pm
Prerak Patel141.1K
v2
Comments
Prerak Patel at 9-Mar-11 1:30am
   
post the error from GetLastError, and some more code if required.
Gokulnath007 at 9-Mar-11 1:41am
   
thank you.. I have solved it By using QFile::ReadOnly() function.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 365
1 Sergey Alexandrovich Kryukov 220
2 virusstorm 209
3 Kornfeld Eliyahu Peter 165
4 Andy Lanng 139
0 OriginalGriff 1,403
1 Sergey Alexandrovich Kryukov 970
2 Abhinav S 696
3 F-ES Sitecore 505
4 Suvendu Shekhar Giri 503


Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 17 Sep 2014
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100