Solved

Can't make ISAPI using CGIExpert

Posted on 2000-05-04
6
213 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now