cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

How do you open a serial com port connection in the c sdk?

jbennett1
1-Newbie

How do you open a serial com port connection in the c sdk?

Hello all,

Currently in C you can open a connection with

SerialConnection("COM1", CBR_9600, 8, ONESTOPBIT, NOPARITY,  50, 10);

This passes to a function which calls

HANDLE hSerial = CreateFile(portString, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );

more code etc.

Now if I try to combine this with the thingworx c sdk it gives an access violation. Do anyone know how to do this correctly?

Many Thanks

0 REPLIES 0
Top Tags