示例#1
0
 internal RemoteThread(RemoteProcess process, ProcessThread thread, IMarshalledValue parameter = null) : this(process, thread)
 {
     m_Parameter        = parameter;
     m_ParameterCleaner = new Task(() => {
         Join();
         m_Parameter?.Dispose();
     });
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RemoteThread"/> class.
 /// </summary>
 /// <param name="memorySharp">The reference of the <see cref="Library.MemorySharp.MemorySharp"/> object.</param>
 /// <param name="thread">The native <see cref="ProcessThread"/> object.</param>
 /// <param name="parameter">The parameter passed to the thread when it was created.</param>
 internal RemoteThread(MemorySharp memorySharp, ProcessThread thread, IMarshalledValue parameter = null) : this(memorySharp, thread)
 {
     // Save the parameter
     _parameter = parameter;
     // Create the task
     _parameterCleaner = new Task(() =>
     {
         Join();
         _parameter.Dispose();
     });
 }
示例#3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="RemoteThread" /> class.
 /// </summary>
 /// <param name="processPlus">The reference of the <see cref="MemoryManagement.MemorySharp" /> object.</param>
 /// <param name="thread">The native <see cref="ProcessThread" /> object.</param>
 /// <param name="parameter">The parameter passed to the thread when it was created.</param>
 public RemoteThread(IProcess processPlus, ProcessThread thread, IMarshalledValue parameter = null)
     : this(processPlus, thread)
 {
     // Save the parameter
     _parameter = parameter;
     // Create the task
     _parameterCleaner = new Task(() =>
     {
         Join();
         _parameter.Dispose();
     });
 }