An ISAPI project to send a page with an image to the browser

This article describes an ISAPI project to send a page containing an image to the browser. The image itself is somewhere under the root directory, you must hardcode its location into the program or change the provided source to load from registry.

The ISAM generates a page that contains an IMG tag with the SRC field pointing to the ISAM itself with a GetImage command (see the html source for the dinamically generated page).

The full source code for the ISAM is provided, you will have to compile it in order to get a working site. Before compiling you will have to change some constants in the code: the module location and the image location. These constants are found in the isam.cpp file. Once you have compiled the project with correct site location and image location you will need to take the following steps to install:

  • Create a directory under your http server root for the project
  • Copy the isam.dll file and the image to this directory (the image location must be the same you specified in the isam.cpp file)
  • Create a virtual directory in your http server to access the dll (remember to grant execute rights). The name of the directory must be the same you set in the project

Download Source Code


Last updated: 10 June 1998



Comments

  • Push server

    Posted by Legacy on 05/02/2002 12:00am

    Originally posted by: KC

    How do I modify the code so that it pushes an image to client browser, say, in every 5 seconds ? 
    
    

    Reply
  • A small error in ISAM.cpp file

    Posted by Legacy on 02/26/2002 12:00am

    Originally posted by: Sinisha Ristich

    There is a small error in isam.cpp file:

    There shoud be:
    static const TCHAR szImageLocation[] = _T("c:\\inetpub\\wwwroot\\isapitest\\image\\car1.jpg");

    instead of:

    static const TCHAR szImageLocation[] = _T("c:\\inetpub\wwwroot\\isapitest\\image\\car1.jpg");

    Reply
  • Source Code for ISAM.dll

    Posted by Legacy on 04/17/2001 12:00am

    Originally posted by: Shyam

    The ZIP file is not working kept for download.

    Reply
  • How to activate the ispai .dll from a browser?

    Posted by Legacy on 04/18/2000 12:00am

    Originally posted by: Andy

    After I did according to the above steps, how to activate the ispai .dll from a browser?

    Reply
  • ISAPI for downloading Images in the Browser using DLL

    Posted by Legacy on 03/19/1999 12:00am

    Originally posted by: M.Sukumar

    Hi,
    Would anyone let me know how to use this with creating the directories. I have done everything the title and other text comes in but Image doesn't, While opening it gives an exception stating Sharing Violation. Hope any one will solve this.

    Bye,
    Sukumar

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Companies undertaking an IT project need to find the right balance between cost and functionality. It's important to start by determining whether to build a solution from scratch, buy an out-of-the-box solution, or a combination of both. In reality, most projects will require some system tailoring to meet business requirements. Decision-makers must understand how much software development is enough and craft a detailed implementation plan to ensure the project's success. This white paper examines the different …

  • On-demand Event Event Date: February 12, 2015 The evolution of systems engineering with the SysML modeling language has resulted in improved requirements specification, better architectural definition, and better hand-off to downstream engineering. Agile methods have proven successful in the software domain, but how can these methods be applied to systems engineering? Check out this webcast and join Bruce Powel Douglass, author of Real-Time Agility, as he discusses how agile methods have had a tremendous …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date