(pSourceSid)
| 1410 | # __in PSID pSourceSid |
| 1411 | # ); |
| 1412 | def CopySid(pSourceSid): |
| 1413 | _CopySid = windll.advapi32.CopySid |
| 1414 | _CopySid.argtypes = [DWORD, PVOID, PSID] |
| 1415 | _CopySid.restype = bool |
| 1416 | _CopySid.errcheck = RaiseIfZero |
| 1417 | |
| 1418 | nDestinationSidLength = GetLengthSid(pSourceSid) |
| 1419 | DestinationSid = ctypes.create_string_buffer("", nDestinationSidLength) |
| 1420 | pDestinationSid = ctypes.cast(ctypes.pointer(DestinationSid), PVOID) |
| 1421 | _CopySid(nDestinationSidLength, pDestinationSid, pSourceSid) |
| 1422 | return ctypes.cast(pDestinationSid, PSID) |
| 1423 | |
| 1424 | |
| 1425 | # PVOID WINAPI FreeSid( |
nothing calls this directly
no test coverage detected