From .NET Compact Framework, there is no API allowing access to the driver interfaces, as the main reason of the framework existence is to be able to run on whatever hardware an application without having to recompile it, this by the usage of the CLR (Common Language Runtime).But developer working on embedded systems usually have to access those drivers that are specific to the platform. So in that case they need an access to the native APIs.Identify the needsBefore getting access to the driver from C# you have to identify the APIs that have to be mapped from native to managed environment. Accessing a driver from native code is performed using the following APIs :- CreateFile : in order to open a driver instance- CloseHandle : to close the opened instance- ReadFile : read data from the stream- WriteFile : write data into the stream- Seek : move data pointer in the stream- DeviceIoControl : to perform driver specific actions with the usage of the CTL_CODE macro for commands IDsMap the native APIIn order to map ...
I’m opening this bog on Embedded101.com to share with you technical content for your favorite Windows Embedded operating systems.
I hope that you will enjoy the content, and will often visit us.