For one of my application I need to access the serial port of the PPC(I have a Compaq Aero 2180 having win CE 2.11) .I tried opening the port using the CreateFile statement, but it gave me an error saying
INVALID_HANDLE_VALUE. I tried running the program on the device as well as in emulation . It failed on both. In emulation I did kill the NT serial drivers and started the CE ones(i.e NET STOP SERIAL and then NET START WCEEMULD), but that didnt help either. I used GetLastError() and the value it returned was 2(i.e The system cannot find the file specified).the code goes something like this.
// open port for I/O
h = CreateFile(comport,
Also tried writng it as
h = CreateFile(TEXT("COM1:"),
After this, the h is simply "INVALID_HANDLE_VALUE", which means it failed to open the port. Can anyone suggest where I am doing it wrong. Do I need to make any changes in the registry settings? Any help will be greatly appreciated .