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

Fixed constant in winapi.py. #376

Merged
merged 1 commit into from
Oct 6, 2016
Merged

Conversation

pierregr
Copy link
Contributor

Changed constant in winapi.py to

FILE_LIST_DIRECTORY = 1

from

FILE_LIST_DIRECTORY = 0x01

accordingly to kernel32.dll documentation after file not found errors in line 276

def get_directory_handle(path):
    """Returns a Windows handle to the specified directory path."""
    return CreateFileW(path, FILE_LIST_DIRECTORY, WATCHDOG_FILE_SHARE_FLAGS,
                       None, OPEN_EXISTING, WATCHDOG_FILE_FLAGS, None)

during watchdog startup on win2008 server.

Fixed winapi.py accordingly to kernel32.dll documentation. After file not found errors in line 276:

def get_directory_handle(path):
    """Returns a Windows handle to the specified directory path."""
    return CreateFileW(path, FILE_LIST_DIRECTORY, WATCHDOG_FILE_SHARE_FLAGS,
                       None, OPEN_EXISTING, WATCHDOG_FILE_FLAGS, None)

during watchdog startup on win2008 server.
@danilobellini
Copy link
Collaborator

But 0x01 is 1. That makes no difference at all.

@pierregr
Copy link
Contributor Author

pierregr commented Oct 3, 2016

It seems the kernel32.dll on win 2008 server running in VMWare disagrees on that. Could be the endianess. Let python handle it for you and everything is right.

@gorakhargosh
Copy link
Owner

LGTM.

@gorakhargosh gorakhargosh merged commit 1e0d81e into gorakhargosh:master Oct 6, 2016
CCP-Aporia pushed a commit to CCP-Aporia/watchdog that referenced this pull request Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants