internal unsafe int GetExecutingProcessorType( IntPtr self, IMAGE_FILE_MACHINE *type) { switch (DataReader.GetArchitecture()) { case Microsoft.Diagnostics.Runtime.Architecture.Amd64: *type = IMAGE_FILE_MACHINE.AMD64; break; case Microsoft.Diagnostics.Runtime.Architecture.X86: *type = IMAGE_FILE_MACHINE.I386; break; case Microsoft.Diagnostics.Runtime.Architecture.Arm: *type = IMAGE_FILE_MACHINE.THUMB2; break; case Microsoft.Diagnostics.Runtime.Architecture.Arm64: *type = IMAGE_FILE_MACHINE.ARM64; break; default: *type = IMAGE_FILE_MACHINE.UNKNOWN; break; } return(S_OK); }
internal unsafe int GetExecutingProcessorType( IntPtr self, IMAGE_FILE_MACHINE *type) { switch (Target.Architecture) { case Architecture.X64: *type = IMAGE_FILE_MACHINE.AMD64; break; case Architecture.X86: *type = IMAGE_FILE_MACHINE.I386; break; case Architecture.Arm: *type = IMAGE_FILE_MACHINE.THUMB2; break; case Architecture.Arm64: *type = IMAGE_FILE_MACHINE.ARM64; break; default: *type = IMAGE_FILE_MACHINE.UNKNOWN; break; } return(HResult.S_OK); }