isapi extension

currently i'm using visual c++ 6.0 to create isapi extension. i face a problem to locate my _outp() command. where should i locate it in the program? it will receive the number sent by the user and output it to parallel port at the server side. is it can't be located under on_parse_command() function which has the CHttpServerContext?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

_outp() is not possible from an ISAPI extension.

This is a protected mode instruction on WIN32 and can only be run by a program which is running in RING0.  That means it's a DEVICE DRIVER on NT or a VxD on Win9x.

Since you're talking about ISAPI, I'll have to assume your also talking about NT Server running IIS.  That leaves you with the following possibilities:

1) If you need to directly control the parallel port, get or write a parallel port device driver that has the functionality you need and install it.  Now you can open it from your ISAPI with CreateFile() and then you can control it with DeviceIoControl().

2) If you just need the functionality of the standard parallel port (i.e. the printer driver function) you can open the standard parallel port with CreateFile() and output to it with WriteFile().

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
deric19Author Commented:

   thanks for the answer. but i'm just a greenhorn in using isapi, can u give a some guide or example how to use CreateFile() and DeviceIoControl() to control my parallel port in NT server running IIS. Thanks again for the advise.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.