Thanks anda_soka for your help, I now understand how to pass the QByteArray to my .c file already . The main problem is I was not sure of how to use the extern properly. Thanks to Santosh Reddy for giving me the link to the extern information . Really appreciate your help