cheney Posted August 12, 2010 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 !!
PsaltyDS Posted August 12, 2010 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now