|
-
Feb 27th, 2002, 02:05 PM
#1
Thread Starter
Hyperactive Member
activex dll or exe?
I have an existing standard exe. Everything with it works fine. I'm extremely new to com/activex development. I want to modifiy the code of my standard exe to work in a com object. My reason for this is that I want to be able to interact with it from asp. Basically, I need asp to pass a parameter to the com and when the com is done processing, it will need to pass a parameter back to the asp. Is this do-able? Should I use an activex dll or an activex exe?
Thanks,
Paul
-
Feb 27th, 2002, 07:34 PM
#2
Hyperactive Member
Hi, yes, this is certainly doable. Basically ActiveX.exes and ActiveX.dlls are very close except the dll runs "in process" and the .exe runs "out of process".
If you are using ASP then you are already using alot of COM objects;
ADODB.Connection Database connection object for example..
Good luck
Regards
MarkusJ
-
Feb 28th, 2002, 06:14 AM
#3
Addicted Member
if you want to wait on a call, DLL, exe's can be ran alongside our code.
Some Days, i just get this feeling that i'm helping to write dozens of Viruses...
-
Feb 28th, 2002, 09:05 PM
#4
Thread Starter
Hyperactive Member
Great, thanks for the replies. I have one more question. I've started making an activex dll. I get hung up on one of the most important parts of the app. I can't get excel to open from the dll. In a standard exe, I just use this:
VB Code:
dim objExcelApp
Set objExcelApp = CreateObject("Excel.Application")
Then I can do whatever I need. With the dll, I tried that and tried
VB Code:
Set objExcelApp = Server.CreateObject("Excel.Application")
This sometimes gives a permission denied error. What happens though is that excel.exe will show up in the system process (task manager win2k pro), but excel never opens. (I do have the visible property set to true)
Any ideas? Could it be somethig to do with my IIS 5.0 settings?
Thanks,
Paul
-
Mar 1st, 2002, 04:02 AM
#5
New Member
I do not find any error with the source code you have given.
But the excel file you are trying to open may have access privileges. i.e. network drive etc.
Present more code so that it can be solved faster.
Bye.
HTML code is ON
vB Code is ON
[img] code is ON
Smilies are ON
-
Mar 1st, 2002, 04:09 PM
#6
Thread Starter
Hyperactive Member
Right now, I am only trying to open excel before I go on with any more. The dll's name is testCom.dll (and it is registered). Here is all the code:
DLL Code:
VB Code:
Public Sub openExcel()
Dim objExcelApp As Object
Set objExcelApp = CreateObject("Excel.Application")
objExcelApp.Visible = True
objExcelApp.DisplayAlerts = True
objExcelApp.Visible = True
objExcelApp.DisplayAlerts = True
objExcelApp.Workbooks.Open "C:\Inetpub\wwwroot\cpthandler\cptFiles\CPT-10.CPD"
End Sub
I've also tried:
VB Code:
Server.CreateObject("Excel.Application")
from asp, that didn't work either.
Keep in mind, from a standard exe, I can open excel fine using the same code that the dll uses.
Thanks for any ideas.
Paul Grimes
ASP Code:
VB Code:
<%@ LANGUAGE="VBSCRIPT" %>
<%
Set objCallCom = Server.CreateObject("testCom.testClass")
Call objCallCom.openExcel()
Set objCallCom = Nothing
%>
-
Mar 1st, 2002, 04:10 PM
#7
Thread Starter
Hyperactive Member
oops, my post got mixed up. The "ASP Code" at the bottom of the post, is what calls the "DLL Code" at the top of the post.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|