Results 1 to 7 of 7

Thread: activex dll or exe?

  1. #1

    Thread Starter
    Hyperactive Member pgrimes's Avatar
    Join Date
    Aug 2001
    Location
    sacramento
    Posts
    342

    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

  2. #2
    Hyperactive Member MarkusJ_NZ's Avatar
    Join Date
    Jun 2001
    Posts
    375
    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

  3. #3
    Addicted Member
    Join Date
    Apr 2000
    Location
    England
    Posts
    246
    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...

  4. #4

    Thread Starter
    Hyperactive Member pgrimes's Avatar
    Join Date
    Aug 2001
    Location
    sacramento
    Posts
    342
    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:
    1. dim objExcelApp
    2. Set objExcelApp = CreateObject("Excel.Application")

    Then I can do whatever I need. With the dll, I tried that and tried
    VB Code:
    1. 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

  5. #5
    New Member
    Join Date
    Mar 2002
    Posts
    2


    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

  6. #6

    Thread Starter
    Hyperactive Member pgrimes's Avatar
    Join Date
    Aug 2001
    Location
    sacramento
    Posts
    342
    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:
    1. Public Sub openExcel()
    2. Dim objExcelApp As Object
    3.  
    4. Set objExcelApp = CreateObject("Excel.Application")
    5. objExcelApp.Visible = True
    6. objExcelApp.DisplayAlerts = True
    7.  
    8. objExcelApp.Visible = True
    9. objExcelApp.DisplayAlerts = True
    10. objExcelApp.Workbooks.Open "C:\Inetpub\wwwroot\cpthandler\cptFiles\CPT-10.CPD"
    11.  
    12. End Sub

    I've also tried:
    VB Code:
    1. 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:
    1. <%@ LANGUAGE="VBSCRIPT" %>
    2. <%
    3.  
    4. Set objCallCom = Server.CreateObject("testCom.testClass")
    5.  
    6. Call objCallCom.openExcel()
    7.  
    8. Set objCallCom = Nothing
    9. %>

  7. #7

    Thread Starter
    Hyperactive Member pgrimes's Avatar
    Join Date
    Aug 2001
    Location
    sacramento
    Posts
    342
    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
  •  



Click Here to Expand Forum to Full Width