nzbToMedia/libs/jaraco/windows/api/net.py
Labrys of Knossos 8d43b8ea39 Update jaraco-windows to 3.9.2
Also updates:
- importlib-metadata-0.7
- jaraco-windows
- jaraco.classes-1.5
- jaraco.collections-1.6.0
- jaraco.functools-1.20
- jaraco.structures-1.1.2
- jaraco.text-1.10.1
- jaraco.ui-1.6
- more-itertools-4.3.0
- path.py-11.5.0
- six-1.12.0
2018-12-15 15:06:37 -05:00

30 lines
691 B
Python

import ctypes.wintypes
# MPR - Multiple Provider Router
mpr = ctypes.windll.mpr
RESOURCETYPE_ANY = 0
class NETRESOURCE(ctypes.Structure):
_fields_ = [
('scope', ctypes.wintypes.DWORD),
('type', ctypes.wintypes.DWORD),
('display_type', ctypes.wintypes.DWORD),
('usage', ctypes.wintypes.DWORD),
('local_name', ctypes.wintypes.LPWSTR),
('remote_name', ctypes.wintypes.LPWSTR),
('comment', ctypes.wintypes.LPWSTR),
('provider', ctypes.wintypes.LPWSTR),
]
LPNETRESOURCE = ctypes.POINTER(NETRESOURCE)
WNetAddConnection2 = mpr.WNetAddConnection2W
WNetAddConnection2.argtypes = (
LPNETRESOURCE,
ctypes.wintypes.LPCWSTR,
ctypes.wintypes.LPCWSTR,
ctypes.wintypes.DWORD,
)