473,847 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passing a value to VB6

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?
Jul 19 '05 #1
17 5001
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

"Freeserve" <no****@bigfoot .com> wrote in message
news:bl******** **@newsg1.svr.p ol.co.uk...
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?

Jul 19 '05 #2
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.

"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message
news:uH******** ******@TK2MSFTN GP11.phx.gbl...
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

"Freeserve" <no****@bigfoot .com> wrote in message
news:bl******** **@newsg1.svr.p ol.co.uk...
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?


Jul 19 '05 #3
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
"Freeserve" <no****@bigfoot .com> wrote in message
news:bl******** **@newsg2.svr.p ol.co.uk...
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.

"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message
news:uH******** ******@TK2MSFTN GP11.phx.gbl...
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

"Freeserve" <no****@bigfoot .com> wrote in message
news:bl******** **@newsg1.svr.p ol.co.uk...
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?



Jul 19 '05 #4
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.
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
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
"Freeserve" <no****@bigfoot .com> wrote in message
news:bl******** **@newsg2.svr.p ol.co.uk...
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.

"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message
news:uH******** ******@TK2MSFTN GP11.phx.gbl...
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

"Freeserve" <no****@bigfoot .com> wrote in message
news:bl******** **@newsg1.svr.p ol.co.uk...
> 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?
>
>



Jul 19 '05 #5
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
"Freeserve" <no****@bigfoot .com> wrote in message
news:bl******** **@news7.svr.po l.co.uk...
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.

Jul 19 '05 #6
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?
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
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
"Freeserve" <no****@bigfoot .com> wrote in message
news:bl******** **@news7.svr.po l.co.uk...
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.


Jul 19 '05 #7
If it is done with VB than it is not "commandlin e"!

VB doesn't do "commandlin e" (aka "console" applications)

--

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

"Freeserve" <no****@bigfoot .com> wrote in message
news:bl******** **@newsg2.svr.p ol.co.uk...
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?
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
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
"Freeserve" <no****@bigfoot .com> wrote in message
news:bl******** **@news7.svr.po l.co.uk...
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.



Jul 19 '05 #8
If it is done with VB than it is not "commandlin e"!

VB doesn't do "commandlin e" (aka "console" applications)

--

Phillip Windell [CCNA, MVP, MCP]
pw******@wandtv .com
WAND-TV (ABC Affiliate)
www.wandtv.com
Jul 19 '05 #9
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.
"Phillip Windell" <pwindell{at}wa ndtv*d0t*com> wrote in message
news:ez******** ******@tk2msftn gp13.phx.gbl...
If it is done with VB than it is not "commandlin e"!

VB doesn't do "commandlin e" (aka "console" applications)

--

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

"Freeserve" <no****@bigfoot .com> wrote in message
news:bl******** **@newsg2.svr.p ol.co.uk...
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?
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in

message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
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
"Freeserve" <no****@bigfoot .com> wrote in message
news:bl******** **@news7.svr.po l.co.uk...
> 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. >



Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3975
by: Alex Vinokur | last post by:
Various forms of argument passing ================================= C/C++ Performance Tests ======================= Using C/C++ Program Perfometer http://sourceforge.net/projects/cpp-perfometer http://alexvn.freeservers.com/s1/perfometer.html
15
4693
by: Dave | last post by:
I'm currently working on a small project (admitedly for my CS class) that compares the time difference between passing by value and passing by reference. I'm passing an array of 50000 int's. However, since in C++ an array is passed by reference by default I need to embed the array into a struct in order to pass it by value. The problem is that I get a segmentation error when doing so. I'm using the Dev-c++ compiler. Any ideas? ...
58
10206
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of code... TCHAR myArray; DoStuff(myArray);
7
2872
by: Harolds | last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005 the pmID is evaluated to "" instead of what the value is set to: .... xmlItems.Document = pmXML // Add the pmID parameter to the XSLT stylesheet XsltArgumentList xsltArgList = new XsltArgumentList(); xsltArgList.AddParam("pmID", "", pmID); xmlItems.TransformArgumentList = xsltArgList;
9
2302
by: Just Me | last post by:
PARAFORMAT2 is a structure that SendMessage will return stuff in. Is the "ref" correct or since only a pointer is being passed should it be by value? Suppose I was passing data rather then receiving it, would that change the answer to the above?
6
6007
by: MSDNAndi | last post by:
Hi, I get the following warning: "Possibly incorrect assignment to local 'oLockObject' which is the argument to a using or lock statement. The Dispose call or unlocking will happen on the original value of the local." My code is: using System; using System.Collections.Generic;
17
2825
by: Christopher Benson-Manica | last post by:
Does the following program exhibit undefined behavior? Specifically, does passing a struct by value cause undefined behavior if that struct has as a member a pointer that has been passed to free()? #include <stdlib.h> struct stype { int *foo; };
12
2695
by: Andrew Bullock | last post by:
Hi, I have two classes, A and B, B takes an A as an argument in its constructor: A a1 = new A(); B b = new B(a1);
12
5409
by: Mike | last post by:
Consider the following code: """ struct person { char *name; int age; }; typedef struct person* StructType;
7
3315
by: TS | last post by:
I was under the assumption that if you pass an object as a param to a method and inside that method this object is changed, the object will stay changed when returned from the method because the object is a reference type? my code is not proving that. I have a web project i created from a web service that is my object: public class ExcelService : SoapHttpClientProtocol {
0
9887
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9730
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10707
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7883
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5719
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5911
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4529
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4119
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3164
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.