MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / BitsCopyCallbackSetEvent

Class BitsCopyCallbackSetEvent

windows/winobject/bits.py:39–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37 return True
38
39class BitsCopyCallbackSetEvent(BitsCopyCallback):
40 def __init__(self, event):
41 super(BitsCopyCallbackSetEvent, self).__init__()
42 self.event = event
43
44 # With the current generated_def.interface design, the current
45 # prototype is:
46 # ctypes.WINFUNCTYPE(HRESULT, PVOID, PVOID)(4, "JobError")
47 # How should I address that ?
48 def JobError(self, this, job, error):
49 job = BitsCopyJob(job)
50 error = BitsCopyError(error)
51 errcode, errctx = error.error
52 print("Copy failed with error code <{0:#x}> (ctx={1})".format(errcode, errctx))
53 print("see <https://msdn.microsoft.com/en-us/library/windows/desktop/aa362823(v=vs.85).aspx>")
54 self.event.set()
55 return True
56
57 def JobTransferred(self, this, job):
58 self.event.set()
59 return True
60
61class BitsCopyManager(IBackgroundCopyManager):
62 def get_jobs(self, flags=0):

Callers 1

waitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected