Skip to content

Commit

Permalink
Merge pull request #91 from AzureAD/memcpy_argtypes
Browse files Browse the repository at this point in the history
Specify memcpy argtypes
  • Loading branch information
rayluo committed Jun 3, 2021
2 parents cda417f + 5e55ed0 commit e889c44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions msal_extensions/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
_LOCAL_FREE = ctypes.windll.kernel32.LocalFree
_GET_LAST_ERROR = ctypes.windll.kernel32.GetLastError
_MEMCPY = ctypes.cdll.msvcrt.memcpy
_MEMCPY.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_size_t] # Note:
# Suggested by https://github.com/AzureAD/microsoft-authentication-extensions-for-python/issues/85 # pylint: disable=line-too-long
# Matching https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memcpy-wmemcpy?view=msvc-160 # pylint: disable=line-too-long
_CRYPT_PROTECT_DATA = ctypes.windll.crypt32.CryptProtectData
_CRYPT_UNPROTECT_DATA = ctypes.windll.crypt32.CryptUnprotectData
_CRYPTPROTECT_UI_FORBIDDEN = 0x01
Expand Down

0 comments on commit e889c44

Please sign in to comment.