Solved

Can't make ISAPI using CGIExpert

Posted on 2000-05-04
6
222 Views
Last Modified: 2010-04-04
Hi!

I try this :

New -> Dll
New -> DataModule OR Form

In the module or the form, I add the ISAPIengine, then, double click it and add the line "putline ('test');"

Compile it... Run explorer, and enter http://localhost/cgi-bin/test.dll

and it gives me an exception... If I try to shutdown the IIS 5, it freezes and I have to restart the computer. I've also tried the httpengine, combination with forms, etc, but none worked... However, the example work just fine (the counter). What am I doing wrong? Also I tried the line in the project file "uses isapieng" , but didn't solve anything. (The counter example doesn't have it aswell).

Thanks in advance.

My system is
Windows 2000 PRO
IIS 5
Delphi 5 Enterprise
CGI expert 5.0.6


0
Comment
Question by:jpcs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 1

Author Comment

by:jpcs
ID: 2778352
The exception is :

inetinfo.exe - Application Error

The instruction "0x018a0626" referenced memory at "0x0000008a". The memory could not be "read".


Hope it helps
0
 
LVL 15

Expert Comment

by:simonet
ID: 2778773
CGIExpert is for CGI, not ISAPI.

If you're using D5 Ent, there's no need to add other experts than the ones that already come with Delphi.

Here's what to do:
- From the Delphi 5 Enterprise IDE, choose File | New
- Now choose the "New"  tab and then select " Web Server Application". Click OK
- From the dialog that pops up, select "ISAPI/NSAPI Dyanamic Link Library" and click Ok

THat's all it takes. The Web module is automatically created and there's nothing else you need to worry about. Just create the ISAPI paths, add the handlers and you're all set.

Yours,

Alex
0
 
LVL 1

Author Comment

by:jpcs
ID: 2782925
sorry, but I already bought CGI Express, and my scriopt is all done with it, but I wanted to pass it to ISAPI
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:simonet
ID: 2783093
Sorry, but you lost your money, pal. If you have Delphi 5 Enterprise, then CGI Express is a waste of money and time, since Delphi comes with built-in experts that does **EVERYTHING** CGI Express does, but easier and faster.

CGI Express is meant for CGI and CGI is not ISAPI.

Alex
0
 
LVL 15

Accepted Solution

by:
simonet earned 100 total points
ID: 2843566
ISAPI DLLs are cannot be created as you create just any other DLL. There are lots of callback functions that must be defined, as well as the entry function for the DLL.

With Delphi 5 Enterprise or Delphi 4 C/S, there's no need for CGIExpert, since Delphi can do and handle it all.

Here's how to create a ISAPI DLL with Delphi 4/5:

- Go to File | New... and select "Web Server Application" on the 'New' tab.

- On the dialog that appears, select ISAPI/NSAPI Dynamic Link Library and click Ok.

Start only the non-ISAPI spefic code, because that ISAPI-specific code ha already been created by Delphi.

Debugging CGI EXEs are a lot easier then debuggin a ISAPI DLL, because it doesn't require you ro bring the web server down everytime you recompile the DLL. If you want to create your project as CGI and then turn it into an ISAPI DLL, here's how:

http://community.borland.com/article/0,1410,20641,00.html

If you want to debug the ISAPI directly on the web server (IIS 4), here's how:

http://community.borland.com/article/0,1410,20901,00.html

And then there is IntraBob, this great freeware tool that lets you debug any kind of webserver application directly into Delphi:

http://www.drbob42.com/tools/intrabob.htm 

Yours,

Alex
0
 
LVL 1

Author Comment

by:jpcs
ID: 2846606
Answer accepted
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Convert GUI app into console app for Win32 Env 5 137
Graphics32 under Delphi 10.1 Berlin 2 179
migrate this code to work on android 1 45
TAction.OnAfterExecute? 2 31
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question