Click here to Skip to main content
15,034,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I'm working on a single board computer which has GPIO por, the os is windows xp ebmedded, the driver for the gpio is .sys file which have been installed in windows\system32\drivers
I need to write a program in c# which communicate with gpio (read and write)
I am using createfile function in order to handle the driver and use this handle to call DeviceIOcontrol but the problem is i always get (by testing creatfile function)-1 which means invaled_handle_file
i think my problem is the device name i used the class GUID which i get from the inf file for the device but i have the same problem
any suggestion where could be me problem!
and how exactly i should find the GUID for the device?
and how to use it in the Createfile function in C#??
thanks for any help
RH
Posted

1 solution

Haven't you got any documentation on that driver? If you (or your company) bought the board, you should have its drivers and the documentation about its API. If you don't, just find the board's reference and search its documentation/SDK from internet.

In most cases, such boards even come with code examples.

If you tell us what board you are using, maybe some of us will be able to help you. Otherwise your question is too generic...
   
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900