cuboro Posted January 6, 2015 Posted January 6, 2015 (edited) Hello, i cann't open COM10(also serial port number large than 9) by calling _CommAPI_OpenCOMPort() . My problem is:I have two PCs. The two PCs are installed with windows 7/64bit. In one PC there is one physical COM1, i have changed the physical COM1 to the number COM10(or COM11...) in device manager in windows controll, the COM10 is opened by calling _CommAPI_OpenCOMPort()(the function from https://www.autoitscript.com/wiki/CommAPI), no problem. But in the other PC no physical COM1 is installed, then i must use an USB-Serial Port-Adapter(LogiLink). I have used _CommAPIGetCOMports() to get the COMPorts list, also the USB-Serial Port-Adapter hat got the number COM10, then i have called _CommAPI_OpenCOMPort() to open COM10, it didn't worked. i have get the handle of the _WINAPI_CreateFile() = 0 with sometime Error Message =2 or sometime Error Message = 0(wenn calling _WINAPI_GetLastError()). But i can open the USB-Serail Port-Adapter with HTerm.exe program. HTerm connects COM10. Why is it? Please help me. Best regardscuboro #include "CommInterface.au3" #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 local $iPort = "COM10" local $comPort = _CommAPI_OpenCOMPort($iPort, "19200", "0", "8", "0") MsgBox(0, "comport-handle", $comPort) Edited January 6, 2015 by cuboro
JohnOne Posted January 6, 2015 Posted January 6, 2015 Might be best to post in that UDF specific thread. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now