which argtypes for NetShareAdd
The win32 function NetShareDel takes three arguments, LPCWSTR LPCWSTR and DWORD. So I use the following list for argtypes: C.windll.Netapi32.NetShareDel.argtypes = [LPCWSTR, LPCWSTR, c_int] C.windll.Netapi32.NetShareDel.restype = c_int C.windll.Netapi32.NetShareDel(server, shareName, 0) That works fine, but I can't figure out what to use for NetShareAdd, especialle the byte array for NET_SHARE_INFO struct and the last byref(c_int) argument. Here's the code: def Share(server, shareName, dir): info = SHARE_INFO_2() STYPE_DISKTREE = 0 info.shi2_netname = shareName info.shi2_path = dir info.shi2