79207785

Date: 2024-11-20 15:09:32
Score: 0.5
Natty:
Report link

The answer from Anton Tykhyy works splendidly; though in the meantime I have found another way to solve this problem, by casting to a c_void type as shown below:

let cid: CLIENT_ID = CLIENT_ID {
    UniqueProcess: HANDLE(pid as *mut core::ffi::c_void),
    UniqueThread: HANDLE(0 as *mut core::ffi::c_void)
};

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Tom Stock