How to read from memory I / O port in .Net?

Can standard pointers in .Net do this? Or need to resort to P / invoke?

Note that I'm not talking about object references; I am talking about actual C # pointers in unsafe code.

+3
source share
2 answers

C #, as a managed and protected run-time mechanism, does not allow access to low-level hardware and memory locations associated with the actual hardware are not available.

You will need to use a port driver or write your own in C ++ or C using the appropriate Windows API to access memory mapped I / O areas. This will work in a lower ring than C # programs can use.

, #, , ++, #. , , ( ++ , ).

-Adam

+5

, - Win32 . , Win32, , .

, , , API, - ( ). , , - , , DOS/Win16 Win32. , .

+3

Source: https://habr.com/ru/post/1698327/


All Articles