Tuesday 30 June 2020

Windows 10 ARM Strategy

Microsoft is putting Windows 10 on ARM, and .NET 5 will include Windows Forms support on ARM. In short, plus points of using ARM vs Intel x86 components (microprocessors) include built-in LTE cellular connectivity, better battery life and cheaper hardware.

Monday 8 June 2020

Order files by Time

What did I last edit?

dir /o:d is the way to sort by date - oldest first. Newest appear at the end.

If you add a prefix "minus sign" you can reverse the sort order.

dir /o:-d

Tuesday 2 June 2020

Output of ildasm == CIL (directives, opcodes et al).

Reading the output of ildasm (IL disassembler) after giving it a .NET DLL as an example, produces MSIL / CIL (see footnote 1) worthy of further explanation.

CIL (Common Intermediate Language) is the "mother tongue" of the .NET platform.

The first types of tokens present in a CIL program are directives e.g. .class, .method, .assembly etc. They convey structural information.  Next are various opcodes, such as loadstr which is short for LoadString.

Footnote 1)

Strictly speaking, MSIL has been renamed CIL (Common Intermediate Language), which is the instruction set defined by the Common Language Infrastructure (CLI) specification.

However, MSIL is still colloquially commonly used.

Fun Fact 1)

System.Reflection.Emit allows you to generate in-memory .NET assemblies in CIL.

Monday 1 June 2020

What is a ProcessModule? Ans: An Abstraction of a DLL or EXE file.

.NET uses the term "ProcessModule" to refer to a DLL or EXE file.  

Noting that this "term" is represented by a corresponding "type" we drop the speech marks henceforth.

ProcessModule 
- is defined in System.Diagnostics
- implements IDisposable interface (which means it can be disposed using Dispose within a try-catch or implicitly destroyed within a using block (using in C#, Using in VB.NET)).
- Has interesting properties including BaseAddress which returns an IntPtr (representing the memory address where the pointer was loaded).

IntPtr is defined in System.Runtime dll.