由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
BuildingWeb版 - Re: Can asp invoke a software at the server side???Help, very urgent!
相关主题
ASP string.endswith 问题学完了html、js之后之应该学习asp吗?
[转载] 请教ASP高手how to do this?
[转载] ASP的script function里, 可以query database吗?Ask Monark: How to solve the string quote problem
How to read out part of a string like xx/xx/xxxxCan asp invoke a software at the server side???Help, very urgent!
ASP究竟是怎么回事?Php 请教!
请问 Javascript + ASP + ADO ?问一个土问题 关于 url
Question on this ASP code.Re: One Simple Apache Question
vbscript and ASPRe: [转载] webmonkey
相关话题的讨论汇总
话题: asp话题: com话题: program话题: vb话题: shell
进入BuildingWeb版参与讨论
1 (共1页)
p*****e
发帖数: 58
1

if your server side program is an exe (non-COM), you can
write a simple COM class using VB. Within the COM you use
the "Shell" function to start the executable. The reason you
need VB is that ASP (actually its scripting language
VBScript) can not call Shell directly.
If your executable is a COM program, you can create objects
of that program directly in your ASP code, and your program
will automatically start.
N**e
发帖数: 158
2
It's not that easy. Since ASP calls COM as a backend service, a simple shell
call will start the program(e.g. notepad), but the program can only run as
a service with no windows... If you want to run graphical programs you need to
do more.

【在 p*****e 的大作中提到】
:
: if your server side program is an exe (non-COM), you can
: write a simple COM class using VB. Within the COM you use
: the "Shell" function to start the executable. The reason you
: need VB is that ASP (actually its scripting language
: VBScript) can not call Shell directly.
: If your executable is a COM program, you can create objects
: of that program directly in your ASP code, and your program
: will automatically start.

e*****n
发帖数: 11
3

Ah, then what else should I do?

【在 N**e 的大作中提到】
: It's not that easy. Since ASP calls COM as a backend service, a simple shell
: call will start the program(e.g. notepad), but the program can only run as
: a service with no windows... If you want to run graphical programs you need to
: do more.

e*****n
发帖数: 11
4

I have made a simple COM using VB, it runs good in VB and
can start an .exe
file, but when I try to call the method in asp, it does not
work. The IE just go over the asp page and did nothing.
Here is how I call the method in asp:
<%
Dim oDoc
Set oDoc = Server.CreateObject("test.ClsServer")
oDoc.trigger
%>
test is the name of the COM, ClsServer is the class name and
the trigger is the method name.
Can you see any problem?
Thanks.

【在 p*****e 的大作中提到】
:
: if your server side program is an exe (non-COM), you can
: write a simple COM class using VB. Within the COM you use
: the "Shell" function to start the executable. The reason you
: need VB is that ASP (actually its scripting language
: VBScript) can not call Shell directly.
: If your executable is a COM program, you can create objects
: of that program directly in your ASP code, and your program
: will automatically start.

N**e
发帖数: 158
5
It's run at backend. You can use the task manager to see there will be one
instance of program

【在 e*****n 的大作中提到】
:
: I have made a simple COM using VB, it runs good in VB and
: can start an .exe
: file, but when I try to call the method in asp, it does not
: work. The IE just go over the asp page and did nothing.
: Here is how I call the method in asp:
: <%
: Dim oDoc
: Set oDoc = Server.CreateObject("test.ClsServer")
: oDoc.trigger

e*****n
发帖数: 11
6

No, I can not find it.

【在 N**e 的大作中提到】
: It's run at backend. You can use the task manager to see there will be one
: instance of program

N**e
发帖数: 158
7
I can find the program executed by my COM in the process list.

【在 e*****n 的大作中提到】
:
: No, I can not find it.

e*****n
发帖数: 11
8

Really? The is your .dll look likes following(I did it in
VB)?
Public Sub trigger()
Dim RetVal
RetVal = Shell("c:\windows\write.exe",1)
End Sub
Also, do you use asp page to try to trigger?
Thanks

【在 N**e 的大作中提到】
: I can find the program executed by my COM in the process list.
N**e
发帖数: 158
9
I use VC

【在 e*****n 的大作中提到】
:
: Really? The is your .dll look likes following(I did it in
: VB)?
: Public Sub trigger()
: Dim RetVal
: RetVal = Shell("c:\windows\write.exe",1)
: End Sub
: Also, do you use asp page to try to trigger?
: Thanks

e*****n
发帖数: 11
10

Well, then can you offer me your source code? I am not
familiar with VC and the deadline is coming, please. I will
be very appreciate.
Thanks

【在 N**e 的大作中提到】
: I use VC
N**e
发帖数: 158
11
I am quite busy and I don't have the source on my hand. I'll be able to get
that in about 1 week. But you can get the answer via the google.

【在 e*****n 的大作中提到】
:
: Well, then can you offer me your source code? I am not
: familiar with VC and the deadline is coming, please. I will
: be very appreciate.
: Thanks

p*****e
发帖数: 58
12
How long do you expect your program to run? if it finishes
within a second, you will not see it even with the task
manager.

【在 e*****n 的大作中提到】
:
: Well, then can you offer me your source code? I am not
: familiar with VC and the deadline is coming, please. I will
: be very appreciate.
: Thanks

e*****n
发帖数: 11
13

I searched via the google, but I have not find the answer
yet. Can you offer me the source? I think one week is fine.
Please email to z***[email protected] with the source as an
attachment, thanks.

【在 N**e 的大作中提到】
: I am quite busy and I don't have the source on my hand. I'll be able to get
: that in about 1 week. But you can get the answer via the google.

e*****n
发帖数: 11
14

I just want a GUI to be triggered(like a notepad to be start
up), I don't think it will be closed within a second.

【在 p*****e 的大作中提到】
: How long do you expect your program to run? if it finishes
: within a second, you will not see it even with the task
: manager.

1 (共1页)
进入BuildingWeb版参与讨论
相关主题
Re: [转载] webmonkeyASP究竟是怎么回事?
Urgent: ASP support?请问 Javascript + ASP + ADO ?
请教:网页的Back按钮是怎么做的?Question on this ASP code.
网页中数据库格式显示问题vbscript and ASP
ASP string.endswith 问题学完了html、js之后之应该学习asp吗?
[转载] 请教ASP高手how to do this?
[转载] ASP的script function里, 可以query database吗?Ask Monark: How to solve the string quote problem
How to read out part of a string like xx/xx/xxxxCan asp invoke a software at the server side???Help, very urgent!
相关话题的讨论汇总
话题: asp话题: com话题: program话题: vb话题: shell