0 Replies Latest reply on Aug 9, 2016 11:23 AM by jbennett RSS
    jbennett Explorer

    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