Solved

Can't make ISAPI using CGIExpert

Posted on 2000-05-04
6
216 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
  • 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…

839 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