Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix INVALID_FILE_ATTRIBUTES for x64 #10

Merged
merged 1 commit into from Jul 2, 2014
Merged

Conversation

Iristyle
Copy link
Contributor

@Iristyle Iristyle commented Jul 1, 2014

 - The GetFileAttributes Win32 API call returns a DWORD, which is a platform independent 32-bit wide
   unsigned integer:
   http://msdn.microsoft.com/en-us/library/windows/desktop/aa364944(v=vs.85).aspx
   It's max value is 4294967295:
   http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx
 - FFI::Pointer.new(-1).address is platform dependent and on x64 is 18446744073709551615, which is
   the max value of a 64-bit wide unsigned integer.
 - The INVALID_FILE_ATTRIBUTES constant is a valid return value of GetFileAttributes and is defined in winbase.h as:
   #define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
 - Therefore INVALID_FILE_ATTRIBUTES should be defined as 0xFFFFFFFF
@ferventcoder
Copy link
Contributor

@djberg96 this one is a bit blocking for us...

@djberg96
Copy link
Collaborator

djberg96 commented Jul 2, 2014

Ok.

djberg96 added a commit that referenced this pull request Jul 2, 2014
Fix INVALID_FILE_ATTRIBUTES for x64
@djberg96 djberg96 merged commit 163f8aa into chef:ffi Jul 2, 2014
@ferventcoder
Copy link
Contributor

Thanks!

@Iristyle Iristyle deleted the patch-1 branch July 2, 2014 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants