|
||
|
Title: Problem using virtual port with windows API Post by sylvain2222 on Dec 4th, 2006, 12:10pm I try to read from a virtual port using windows API method ReadFile (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/readfile.asp). This method always return 0 byte received. I successfully open the com port with : CreateFileA("COM8", 80000000h + 40000000H, 0, 0, 3, 0, 0) I successfully call ReadFile from the port with : ReadFile(CMD:HandlePortComCommande, CMD:carac, 1, NbRead, 0), but nbRead always return with a value of zero. Code works with other virtual port supplier and works with real com port. |
||
|
Title: Re: Problem using virtual port with windows API Post by Andrew on Dec 5th, 2006, 1:33am Could you please clarify, what our product do you use? As I understand you use Virtual Serial Port Control. You created virtual COM port and try to read from that COM port. Is it so? |
||
|
Title: Re: Problem using virtual port with windows API Post by sylvain2222 on Dec 5th, 2006, 5:54am I'm using Virtual Serial Port Kit version 4.8.3, licensed. I create COM7 and COM8, associated together. My application intend to receive data on COM8 (it can be another com port too). To test, I send data to com7 with hyperterminal, but my application always have a result of 0 byte read anytime. There is no error returned by called functions. When I connect togother 2 physical com port with a null modem cable, com3 and com4 for example, it's working fine. |
||
|
Title: Re: Problem using virtual port with windows API Post by Andrew on Dec 5th, 2006, 6:16am Thank you for your detailed information. Could you please download the latest 4.8.9 version and try again. Awaiting your reply ... |
||
|
Title: Re: Problem using virtual port with windows API Post by sylvain2222 on Dec 5th, 2006, 6:55am So, I installed new version. Same problem. I tried something else : I change flow control from hardware to none. Working fine with this and with xon/xoff. I don't know if I could have the same problem with older version. |