PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

problem with CreateFile

Code:
m_hCom = CreateFile(m_sComPort,
GENERIC_READ,
0,
NULL, //
OPEN_EXISTING,
0, //
NULL);

hi !!
cannot get handle with CreateFile.always get
0xffffffff (m_sComPort is ok ("COM2"))

thanks
nio
Birdiestyle · 03 Feb 2003, 16:57 UTC
does

FILE_ATTRIBUTE_NORMAL

instead of 0 in the 2nd to last parameter fix your problem!?!?
Pejo Software - Per · 03 Feb 2003, 17:01 UTC
Try: m_sComPort=_T("COM2:")
Birdiestyle · 03 Feb 2003, 18:00 UTC
ahhhh.... or the colon.. That probably burnt me the 1st time too, for a while...