I keep getting this error:
cannot convert parameter 1 from \'char\' to \'LPCWSTR\'
int main(int argc, char argv[])
{
// open port for I/
This is the main function that Visual Studio creates by default:
int _tmain(int argc, _TCHAR* argv[])
Where _TCHAR is defined to be char or wchar_t depending if _UNICODE is defined or not. The same thing happens with API functions. I would advise you against using explicit CreateFileA. Change your main and use CreateFile.