Results 1 to 2 of 2

Thread: IE Automation via DLL

  1. #1

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141

    IE Automation via DLL

    A few years ago I made a DLL that automated Internet Explorer as a work around to send email. I had an ASP page that sent email using CDONTS. I would call my DLL and have it pass parameters via the querystring to the ASP page from reference to shdocvw.dll Then that page sent email and all was good.

    Now, I am doing just about the same thing to use a PDF printer to make a PDF of a web page, but I am getting some strange errors. Sometimes I get an Automation Error when I tell IE to navigate to the page. Here is the really stange part, it only happens sometimes. If I get rid of my DLL and run the project in the VB IDE it works fine everytime. But, it only works compiled if I run it from the actual user that will be calling the DLL. What I mean is, I have to make like a VBS file to call the DLL logged in as the user that will be doing the calling when it is called from an ASP page. I am using the DLL in COM+ so that I can have a different user other than the IUSR_ account run it. For my purposes the user is COMPlusUser. I login to the server as this user. Then run the .vbs file which just calls the DLL exactly like the .asp page would. Then I log off the server, and run the asp page from a remote computer. Everything is fine. However, if I reboot the server and try to run the .asp page from anywhere, a remote computer or even the server, I get an Automation error in the routine that I use to navigate the IE object to a web page.

    This is driving me crazy, my first thought is to run that .vbs file in the task scheduler on windows startup, but I would rather IE just work
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  2. #2

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    **bump** has anyone else tried to automate IE via a DLL?
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

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