Hi. I have a problem using serial port under WINDOWS. I have mingw compiler, but when it compiles several errors appears. Can anybody help me?. I've tried with others libraries to open serial port, buy I am still having the same error message.

int openport(char *comport, HANDLE * cfd)
{
    *cfd =
 CreateFile(comport, GENERIC_READ | GENERIC_WRITE, 0, NULL,
     OPEN_EXISTING, 0, NULL);
....................
 
}
serial.cpp: In function `int openport(char*, void**)':
serial.cpp:68: error: cannot convert `char*' to `const WCHAR*' for argument `1' to `void* CreateFileW(const WCHAR*, DWORD, DWORD, _SECURITY_ATTRIBUTES*, DWORD, DWORD, void*)'

Regards,
Joel