cheney 0 Posted August 12, 2010 Hi: I want porting VC++ source code to Autoit, How can set __int64 to function SetFilePointer in Autoit ?? //////////////////Autoit//////////////////////////////////// Func Read($TestDecive,$LBAPos,$Readlength) local $Result = _WinAPI_SetFilePointer($TestDecive, $LBAPos*512,0) EndFunc //////////////////Autoit//////////////////////////////////// //////////////////VC++//////////////////////////////////// BOOL Read(HANDLE dev,DWORD Sector_Start,int Sector_num) { BOOL flag; DWORD Program_len; __int64 distance = Sector_Start*0x200; LARGE_INTEGER li; li.QuadPart = distance; li.LowPart = SetFilePointer (dev, li.LowPart, &li.HighPart, FILE_BEGIN); if (li.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR) { li.QuadPart = -1; return false; } flag = ReadFile(dev,Buffer,Sector_num*0x200,&Program_len,NULL); return flag; } //////////////////VC++//////////////////////////////////// Thanks for your answering !! Share this post Link to post Share on other sites
PsaltyDS 39 Posted August 12, 2010 I believe Yashied has the required _WinAPI_SetFilePointerEx() function in his WinAPIEx.au3 UDF. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
cheney 0 Posted August 15, 2010 Thanks for your information. Share this post Link to post Share on other sites