# Path: resources/lib/PhoneBooks/pyicloud/vendorlibs/win32ctypes/compat.py
# PY3 = True
# 
# Path: resources/lib/PhoneBooks/pyicloud/vendorlibs/win32ctypes/_util.py
# def function_factory(
#         function,  argument_types=None, return_type=None,
#         error_checking=None):
#     if argument_types is not None:
#         function.argtypes = argument_types
#     function.restype = return_type
#     if error_checking is not None:
#         function.errcheck = error_checking
#     return function


import ctypes
from ctypes import pythonapi, POINTER, c_void_p, py_object
from ctypes.wintypes import BYTE, UINT
from .compat import PY3
from ._util import function_factory
#

""" Common constants and wrapped functions
"""
from __future__ import absolute_import



PPy_UNICODE = c_void_p


kernel32 = ctypes.windll.kernel32


if ctypes.sizeof(ctypes.c_long) == ctypes.sizeof(ctypes.c_void_p):
    LONG_PTR = ctypes.c_long
elif ctypes.sizeof(ctypes.c_longlong) == ctypes.sizeof(ctypes.c_void_p):
    LONG_PTR = ctypes.c_longlong

LPBYTE = POINTER(BYTE)

if PY3:
    _PyBytes_FromStringAndSize = function_factory(
        pythonapi.PyBytes_FromStringAndSize,
        return_type=py_object)
else:
    _PyBytes_FromStringAndSize = function_factory(
        pythonapi.PyString_FromStringAndSize,
        return_type=py_object)


# Path: resources/lib/PhoneBooks/pyicloud/vendorlibs/win32ctypes/compat.py
# PY3 = True
# 
# Path: resources/lib/PhoneBooks/pyicloud/vendorlibs/win32ctypes/_util.py
# def function_factory(
#         function,  argument_types=None, return_type=None,
#         error_checking=None):
#     if argument_types is not None:
#         function.argtypes = argument_types
#     function.restype = return_type
#     if error_checking is not None:
#         function.errcheck = error_checking
#     return function


# Path: resources/lib/PhoneBooks/pyicloud/vendorlibs/win32ctypes/_common.py
import ctypes
from ctypes import pythonapi, POINTER, c_void_p, py_object
from ctypes.wintypes import BYTE, UINT
from .compat import PY3
from ._util import function_factory

#

""" Common constants and wrapped functions
"""
from __future__ import absolute_import



PPy_UNICODE = c_void_p


kernel32 = ctypes.windll.kernel32


if ctypes.sizeof(ctypes.c_long) == ctypes.sizeof(ctypes.c_void_p):
    LONG_PTR = ctypes.c_long
elif ctypes.sizeof(ctypes.c_longlong) == ctypes.sizeof(ctypes.c_void_p):
    LONG_PTR = ctypes.c_longlong

LPBYTE = POINTER(BYTE)

if PY3:
    _PyBytes_FromStringAndSize = function_factory(
        pythonapi.PyBytes_FromStringAndSize,
        return_type=py_object)
else:
    _PyBytes_FromStringAndSize = function_factory(
        pythonapi.PyString_FromStringAndSize,
        return_type=py_object)


_GetACP = function_factory(