Dec 22nd, 2024, 7:14am
Welcome, Guest. Please Login or Register.
Pages: 1  Reply Reply  Notify of replies Notify of replies  Print Print
   Author  Topic: Problem using virtual port with windows API  (Read 6042 times)
Problem using virtual port with windows API
on: Dec 4th, 2006, 12:10pm
Quote Quote  Modify Modify

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.
 
IP Logged
Re: Problem using virtual port with windows API
Reply #1 on: Dec 5th, 2006, 1:33am
Quote Quote  Modify Modify

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?  
IP Logged

Andrew Scott

FabulaTech
===================
http://www.fabulatech.com
Re: Problem using virtual port with windows API
Reply #2 on: Dec 5th, 2006, 5:54am
Quote Quote  Modify Modify

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.
IP Logged
Re: Problem using virtual port with windows API
Reply #3 on: Dec 5th, 2006, 6:16am
Quote Quote  Modify Modify

Thank you for your detailed information. Could you please download the latest 4.8.9 version and try again. Awaiting your reply ...
IP Logged

Andrew Scott

FabulaTech
===================
http://www.fabulatech.com
Re: Problem using virtual port with windows API
Reply #4 on: Dec 5th, 2006, 6:55am
Quote Quote  Modify Modify

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.
IP Logged
Pages: 1  Reply Reply  Notify of replies Notify of replies  Print Print

Previous topic | Next topic
Online Talk to our
support team or
sales department.