Computing.Net > Forums > Networking > Comm Port detection in vb6.0

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Comm Port detection in vb6.0

Reply to Message Icon

Name: akshatshrey
Date: November 5, 2005 at 04:17:55 Pacific
OS: Windows XP Professional
CPU/Ram: P4 & 256MB
Comment:

Respected sir,
I am doing a project in visual basic which incorporates the concept of port programming using the mscomm control tool of V.B.I am transferring data from a memory card to a file on P.C. using the MSComm tool.
My problem is that i have been unable to establish automatic detection of the Com Port from where my MSComm is going to pick data.I want a solution on this regard such that on inserting the usb in a particular Comm Port the codes in V.B. automatically detect which Comm Port is it & accordingly set the MSComm.CommPort property for that particular port so that the user doesn't take the burden of filling the Comm Port Number by himself.
Your help regarding the above query will be highly appretiated.Thanking You,
Yours Sincerely,
Akshat Shrey.



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: November 5, 2005 at 10:09:38 Pacific
Reply:

I,m afraid you are barking up the wrong tree. The MSComm control is for use with Communications Ports, that means RS232 serial ports, not USB ports. USB ports don't have a port number, just a device name.

I don't know of any way of accessing the USB ports in VB6. I suspect you going have to write your own USB driver.

Stuart


0

Response Number 2
Name: wizard-fred
Date: November 5, 2005 at 19:43:26 Pacific
Reply:

I think USB will install a virtual Comm port some what like a Win Modem driver. The comm port should be the same every time it is installed. It is whether the MSComm tool can detect the port. You might try a loopto try each port in turn. Try a sample program with the USB connected, then see if it works when the USB is disconnected and reconnected. I think the problem will be error detection.


0

Response Number 3
Name: kadar_mtt
Date: December 21, 2005 at 22:02:26 Pacific
Reply:

You can use "Microsoft Sysinfo control 6.0" control for detect any new device connected on PC. It has DeviceArrival event, when you connect device on Port,event will fire.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Networking Forum Home


Sponsored links

Ads by Google


Results for: Comm Port detection in vb6.0

comm port LOST www.computing.net/answers/networking/comm-port-lost/29500.html

Port detection tool? www.computing.net/answers/networking/port-detection-tool/30983.html

How to use two port address in IE www.computing.net/answers/networking/how-to-use-two-port-address-in-ie/29758.html