def object_from_dict(cls, win_thread_dict): """Create the Windows Thread Object object representation from an input dictionary""" win_thread_obj = win_thread_binding.WindowsThreadObjectType() win_thread_obj.set_anyAttributes_({'xsi:type' : 'WinThreadObj:WindowsThreadObjectType'}) for key, value in win_thread_dict.items(): if key == 'thread_id' and utils.test_value(value): win_thread_obj.set_Thread_ID(Base_Object_Attribute.object_from_dict(common_types_binding.NonNegativeIntegerObjectAttributeType(datatype='NonNegativeInteger'),value)) elif key == 'handle': win_thread_obj.set_Handle(Win_Handle.object_from_dict(value)) elif key == 'running_status': win_thread_obj.set_Running_Status(Base_Object_Attribute.object_from_dict(common_types_binding.StringObjectAttributeType(datatype='String'),value)) elif key == 'context': win_thread_obj.set_Context(Base_Object_Attribute.object_from_dict(common_types_binding.StringObjectAttributeType(datatype='String'),value)) elif key == 'priority': win_thread_obj.set_Priority(Base_Object_Attribute.object_from_dict(common_types_binding.UnsignedIntegerObjectAttributeType(datatype='UnsignedInteger'),value)) elif key == 'creation_flags': win_thread_obj.set_Creation_Flags(Base_Object_Attribute.object_from_dict(common_types_binding.HexBinaryObjectAttributeType(datatype='hexBinary'),value)) elif key == 'creation_time': win_thread_obj.set_Creation_Time(Base_Object_Attribute.object_from_dict(common_types_binding.DateTimeObjectAttributeType(datatype='DateTime'),value)) elif key == 'start_address': win_thread_obj.set_Start_Address(Base_Object_Attribute.object_from_dict(common_types_binding.HexBinaryObjectAttributeType(datatype='hexBinary'),value)) elif key == 'parameter_address': win_thread_obj.set_Parameter_Address(Base_Object_Attribute.object_from_dict(common_types_binding.HexBinaryObjectAttributeType(datatype='hexBinary'),value)) elif key == 'security_attributes': win_thread_obj.set_Security_Attributes(Base_Object_Attribute.object_from_dict(common_types_binding.StringObjectAttributeType(datatype='String'),value)) elif key == 'stack_size': win_thread_obj.set_Stack_Size(Base_Object_Attribute.object_from_dict(common_types_binding.NonNegativeIntegerObjectAttributeType(datatype='NonNegativeInteger'),value)) return win_thread_obj
def object_from_dict(cls, win_event_dict): """Create the Win Event Object object representation from an input dictionary""" win_event_obj = win_event_binding.WindowsEventObjectType() win_event_obj.set_anyAttributes_({'xsi:type' : 'WinEventObj:WindowsEventObjectType'}) for key, value in win_event_dict.items(): if key == 'name' and utils.test_value(value): win_event_obj.set_Name(Base_Object_Attribute.object_from_dict(common_types_binding.StringObjectAttributeType(datatype='String'), value)) elif key == 'handle' : win_event_obj.set_Handle(Win_Handle.object_from_dict(value)) elif key == 'type' and utils.test_value(value) : win_event_obj.set_Name(Base_Object_Attribute.object_from_dict(common_types_binding.StringObjectAttributeType(datatype='String'), value)) return win_event_obj
def object_from_dict(cls, win_mutex_dict): """Create the Win Mutex Object object representation from an input dictionary""" win_mutex_obj = Mutex.object_from_dict(win_mutex_attributes,win_mutex_binding.WindowsMutexObjectType()) win_mutex_obj.set_anyAttributes_({'xsi:type' : 'WinMutexObj:WindowsMutexObjectType'}) for key, value in win_mutex_dict.items(): if key == 'handle' : win_mutex_obj.set_Handle(Win_Handle.object_from_dict(value)) elif key == 'security_attributes' and utils.test_value(value): win_mutex_obj.set_Security_Attributes(Base_Object_Attribute.object_from_dict(common_types_binding.StringObjectAttributeType(datatype='String'), value)) return win_mutex_obj
def object_from_dict(cls, win_pipe_dict): """Create the Win Pipe Object object representation from an input dictionary""" win_pipe_obj = Pipe.object_from_dict(win_pipe_attributes, win_pipe_binding.WindowsPipeObjectType()) win_pipe_obj.set_anyAttributes_({'xsi:type' : 'WinPipeObj:WindowsPipeObjectType'}) for key, value in win_pipe_dict.items(): if key == 'default_time_out' and utils.test_value(value): win_pipe_obj.set_Default_Time_Out(Base_Object_Attribute.object_from_dict(common_types_binding.NonNegativeIntegerObjectAttributeType(datatype='NonNegativeInteger'),value)) elif key == 'handle': win_pipe_obj.set_Handle(Win_Handle.object_from_dict(value)) elif key == 'in_buffer_size' and utils.test_value(value): win_pipe_obj.set_In_Buffer_Size(Base_Object_Attribute.object_from_dict(common_types_binding.NonNegativeIntegerObjectAttributeType(datatype='NonNegativeInteger'),value)) elif key == 'max_instances' and utils.test_value(value): win_pipe_obj.set_Max_Instances(Base_Object_Attribute.object_from_dict(common_types_binding.NonNegativeIntegerObjectAttributeType(datatype='NonNegativeInteger'),value)) elif key == 'open_mode' and utils.test_value(value): win_pipe_obj.set_Open_Mode(Base_Object_Attribute.object_from_dict(common_types_binding.HexBinaryObjectAttributeType(datatype='hexBinary'),value)) elif key == 'out_buffer_size' and utils.test_value(value): win_pipe_obj.set_Out_Buffer_Size(Base_Object_Attribute.object_from_dict(common_types_binding.NonNegativeIntegerObjectAttributeType(datatype='NonNegativeInteger'),value)) elif key == 'pipe_mode' and utils.test_value(value): win_pipe_obj.set_Pipe_Mode(Base_Object_Attribute.object_from_dict(common_types_binding.HexBinaryObjectAttributeType(datatype='hexBinary'),value)) elif key == 'security_attributes' and utils.test_value(value): win_pipe_obj.set_Security_Attributes(Base_Object_Attribute.object_from_dict(common_types_binding.StringObjectAttributeType(datatype='String'),value)) return win_pipe_obj