c++ - Issue with opening COM Port -


in order read data bluetooth device(a disto), device gets paired pc ,by using pair code, , below code used open specific com port:

port.format(str("\\\\.\\com%d"),m_distoserialport); createfile(port, generic_read | generic_write, 0, 0, open_existing, file_attribute_normal, 0); 

it works without problem in every version of windows , kind of device(disto). in windows 8(and 8.1) when comes line little message pops @ right corner of screen saying "adding device. tap set disto xxxx" , fails connect , code returns "e_accessdenied general access denied error".

also, again execution @ method, "allow device connect"(in bluetooth icon on taskbar) gets enabled. while in windows 8 clicking on no help, in windows 7 asks pair code again , createfile method works fine.

does mean device isn't paired although paired? problem opening port or making connection?

does know what's going wrong here?

thanks.

edit: if remove generic_read or generic_write access fails.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -