Print Page | Close Window

abt port programming

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=13113
Printed Date: 29 March 2026 at 9:21am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: abt port programming
Posted By: persepherone
Subject: abt port programming
Date Posted: 25 December 2004 at 6:25am
i am working on a robotic interface project .presently we use outport commands of C to control the robotic vehicle. we call these complied subroutines from VB or from ASP. can anybody tell me if there is a direct way to implement it.i mean is there any command in VB or ASP which can send a desired byte on a desired port........



Replies:
Posted By: Mart
Date Posted: 25 December 2004 at 9:32am
Not in asp but in .net there are tonnes of examples over the internet of how to send commands via the com port, just do a google


Posted By: dpyers
Date Posted: 25 December 2004 at 9:44am
In vb2-6 you can use most of the win api including the com port stuff and bit-level tcp/ip port stuff. I've written listening and sending apps for both.
 
Asp however is a subset of vb and doesn't include the ability to directly reference the win api. You can however, use vb 4+ to create a dll with an interface api that asp can use. Your current C interface will be faster though.
 
As Mart noted though, asp/vb .net is currently the best way to go for port manipulation through a web app.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: persepherone
Date Posted: 27 December 2004 at 5:51am
thanx dpyers, 
Can U plz tell me the API that cud be useful to me..  BTW my currect C interface is not fast because i use compiled programs of C those i call from inside VB using the "shell" statement. if i cud implement it directly in VB or asp than their wud be no disk access & thus no delay .

also i tried to search on google but cannot strike to a appropritate solution. if any1 can provide me some solution or a link i wud be highly grateful.


Posted By: Mart
Date Posted: 27 December 2004 at 9:05am
launching a process in asp.net is quite easy, if you are using inline code (not compiling the asp.net page) insert

<%@ Import Namespace="System.Diagnostics" %>

after the <%@ Page ... %> line. If you are using code behind put Imports System.Diagnostics in the imports section of the class. Then just use Process.Start("MyApp.exe", "parameter1 parameter2")


Posted By: dpyers
Date Posted: 27 December 2004 at 9:38am

.net is the easier way to go. If you're using vb prior to .net though, look for books about the Win32 API for VB. Dan Appleman did a series of them. starting with the Win16 API for win 3.0 and going through to W2K. Carl Franklin also din some useful api books. He used to have a site called Carl and ?????'s Visual Basic ????? which was a very good resource for building components and dll's.

Appleman and Franklin cover the api quite well and have a lot of examples of bulding com port controls.
 
I've got a couple of different books entitled "Visual Basic Internet Programming" thaat cover the details of using the winsock api through vb for various specific internet protocols - e.g. ftp, http, gopher, etc.


-------------

Lead me not into temptation... I know the short cut, follow me.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net