Hi,
I’ve an application which use a virtual port com. It’s serial usb driver (usbser.sys).
It’s work fine when the virtual port is assigned to COM2-COM9, but i can’t open it when is > to COM9.
i work with Microsof Visual c++ 6.0
my code source.
sprintf( acComString, “COM14”);
// Create file
m_hUartHandle = CreateFile( acComString,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED,
NULL );
if ( m_hUartHandle == INVALID_HANDLE_VALUE )
{
// Error in CreateFile
return COMERR_UARTCREATEFILE;
}
Thanks !
You have to do this for COM10 and up…
sprintf( acComString, “\\.\COM14”);
BR,
Rob Linegar
Software Engineer
Data Encryption Systems Limited
www.des.co.uk | www.deslock.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@yahoo.fr
Sent: 12 October 2006 10:38
To: Windows System Software Devs Interest List
Subject: [ntdev] impossiblity to open port com > 9
Hi,
I’ve an application which use a virtual port com. It’s serial usb
driver (usbser.sys).
It’s work fine when the virtual port is assigned to COM2-COM9, but i
can’t open it when is > to COM9.
i work with Microsof Visual c++ 6.0
my code source.
sprintf( acComString, “COM14”);
// Create file
m_hUartHandle = CreateFile( acComString,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_FLAG_NO_BUFFERING |
FILE_FLAG_OVERLAPPED,
NULL );
if ( m_hUartHandle == INVALID_HANDLE_VALUE )
{
// Error in CreateFile
return COMERR_UARTCREATEFILE;
}
Thanks !
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
> It’s work fine when the virtual port is assigned to COM2-COM9, but i can’t
open
it when is > to COM9.
Use names like \.\COM10 and so on.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com