Groups | Blog | Home
all groups > inetserver asp general > september 2003 >

inetserver asp general : Passing a value to VB6


Ray at <%=sLocation%
9/30/2003 8:59:08 AM
How are you calling the VB app? Are you just executing it with a shell
command, or is it an activeX thing and you're creating it within your ASP
app?

Ray at work

[quoted text, click to view]

Ray at <%=sLocation%
9/30/2003 9:37:57 AM
Person1: Is it A or B?
Person2: Yes

Nice. ;]

If it works from the command line, does it accept command$ arguments? If
so, execute it with the Wscript.Shell object. Here's a page about that.
http://www.aspfaq.com/2059

Ray at work


[quoted text, click to view]

Ray at <%=sLocation%
9/30/2003 11:15:07 AM
Even if it's a GUI app, you may still be able to run it on the server. But
it's better to use applications that are created for running sans GUI.

I could have sworn I heard rumors about DDE being added to Microsoft's
"Deprecated Technologies" list. I'm not sure how true that is, as I believe
that netdde still exists in 2003, at least.

What are you trying to do here? Have a user submit a form, and then your
asp page will call one VB app which will then call another? If so, the
issue is with your VB app.

Ray at work


[quoted text, click to view]

Phillip Windell
9/30/2003 1:09:19 PM
If it is done with VB than it is not "commandline"!

VB doesn't do "commandline" (aka "console" applications)

--

Phillip Windell [CCNA, MVP, MCP]
pwindell@wandtv.com
WAND-TV (ABC Affiliate)
www.wandtv.com

Phillip Windell
9/30/2003 1:09:35 PM
If it is done with VB than it is not "commandline"!

VB doesn't do "commandline" (aka "console" applications)

--

Phillip Windell [CCNA, MVP, MCP]
pwindell@wandtv.com
WAND-TV (ABC Affiliate)
www.wandtv.com

[quoted text, click to view]

Freeserve
9/30/2003 1:46:46 PM
Hi,

I am trying to pass a value from an ASP script to a VB application running
on the server. The only way I have got this to work is by using a file,
which is too slow. I tried using DDE but if a VB app contains a form then I
can't get it to run under IIS. Anybody done something similar?

Freeserve
9/30/2003 2:14:00 PM
Yes. It is a small VB app which sends a DDE string to another VB app which
is running all the time. It works from the command line, but as it uses a
form it hangs when called from an ASP script as I think it is trying to
interact with the desktop. (you can see the app in Task Manager). A
similar app which just writes to a file works OK.



[quoted text, click to view]

Ray at <%=sLocation%
9/30/2003 2:30:48 PM
You can create command line apps in VB. It's just clumsy to do so.

Ray at work

[quoted text, click to view]

Bob Barrows
9/30/2003 2:37:16 PM
[quoted text, click to view]
Actually, it does. But this is a topic for another newgroup.

Bob

Freeserve
9/30/2003 3:00:12 PM
It's not ActiveX as you may have guessed. I am using Wscript.Shell, but
this doesn't work if the VB project has a form in it. If it has no form I
can take the command$ argument and write it to a file. To use DDE I need a
form with a TextBox. Even though the form doesn't display I think it causes
a problem when run from Wscript.Shell because you have to load the form even
if it doesn't display. (I am guessing here).

BTW I don't have to use DDE if you can suggest a better way. I just need to
pass some text from an ASP script to a running VB app on the server.

Thanks for your help.


[quoted text, click to view]

Freeserve
9/30/2003 6:27:56 PM
I have 1 app running on the server that communicates with the serial port
(sending data) and listens for DDE from either a local app, netDDE or from
the web server via the command line app. The communication between the web
server and the app doesn't have to be DDE, I used it because it if fairly
easy to implement in VB6. I have seen examples using a very similar method,
but the ran on PWS not IIS. PWS has an option to 'allow interaction with
the desktop' that IIS doesn't seem to have. I think you are correct about
DDE as it is not supported in VB.NOT, but using COM as an alternative is
difficult in VB6.

In summary the user submits a form that sends some text to the serial port.
The VB bit if for checking an to allow another GUI to also use the same
port.


I had hoped to get the communication with the serial port to be 2 way, but
one way will do for now!

Any suggestions?


[quoted text, click to view]

Freeserve
9/30/2003 7:24:50 PM
well its a VB app which I run from the command line like:

aspsend some_text

and some_text is sent to the other app. The problem is this doesn't work
when called from an ASP script if the VB has a form in it but does work if
it doesn't as in the case of writing to a file. I want to use DDE which
requires a form.


[quoted text, click to view]

Phillip Windell
10/1/2003 1:42:06 PM
I have before, in fact I have one in use. But it is not a true
commendline app. It is really just a normal VB App with a form that
has the form property set to invisible and the code executed from the
form's OnLoad event and then "self exits" at the bottom of the Sub.


--

Phillip Windell [CCNA, MVP, MCP]
pwindell@wandtv.com
WAND-TV (ABC Affiliate)
www.wandtv.com

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in
message news:uns#tE4hDHA.1368@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view]

Phillip Windell
10/1/2003 1:47:30 PM
VB is designed to take "parameters" from the user interacting with the
App's form. I think it was a rather convoluted process to get a VB
App to accept commandline parameters. I read some about it once, never
tried it, thought it wasn't worth the trouble, and now I don't even
remember what the process was to do it.

You need to ask in a VB group.


--

Phillip Windell [CCNA, MVP, MCP]
pwindell@wandtv.com
WAND-TV (ABC Affiliate)
www.wandtv.com

[quoted text, click to view]

Ray at <%=sLocation%
10/1/2003 8:24:27 PM
I agree. VB is definitely not a good language for command line apps. I
also have one that I made that runs every night while I sleep. It works,
but if I had my choice, I'd redo it in C. First I'd have to learn C though.
;]

You don't have to have a form.

Ray at home

[quoted text, click to view]

Bob Barrows
10/1/2003 9:43:46 PM
[quoted text, click to view]
Again, this is offtopic, but, check this out:
http://www.developer.com/net/vb/article.php/1538861

Bob Barrows

Phillip Windell
10/2/2003 9:09:03 AM
"Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in
message news:e96GcsHiDHA.2296@TK2MSFTNGP09.phx.gbl...
[quoted text, click to view]
though.

Same here. I took one smemester of C++ but dropped it because the
teacher did so poorly it was a waste of time. I may do it again later
with a different teacher.

[quoted text, click to view]

Use the Code Module? Well, doesn't matter, it's too "OT" anyway and
I don't want to keep dragging the thread out.

--

Phillip Windell [CCNA, MVP, MCP]
pwindell@wandtv.com
WAND-TV (ABC Affiliate)
www.wandtv.com

Phillip Windell
10/2/2003 9:09:38 AM

[quoted text, click to view]

True.

, but, check this out:
[quoted text, click to view]

I'll check it out later.


--

Phillip Windell [CCNA, MVP, MCP]
pwindell@wandtv.com
WAND-TV (ABC Affiliate)
www.wandtv.com

AddThis Social Bookmark Button