Solved

can isapi produce the same thing like the normal program do?

Posted on 2000-03-10
8
232 Views
Last Modified: 2010-04-02
i'm using visual c++ to do isapi. i'm sending 4 parameter to this dll file and try to use it to control my motor at parallel port. it need certain sequence to produce the correct move of motor. the problem happen when the isapi file receive the parameter and process it nicely and produce an output, which i only get the final processing parameter at parallel port.

i've used sleep() function to send the sequence accordingly to make the motor move like i've done in the normal dialog based program. it works fine. but the isapi finish process all the looping and produce one output at parallel port. is there any way to make it run like what happen in dialog based program. is the placing of command and function play a role here. pls advise. thanks.
0
Comment
Question by:giggs11
8 Comments
 
LVL 1

Expert Comment

by:snifong
ID: 2606936
Can you ellaborate a little bit.  I don't understand. What does "...my motor at parallel port." mean?  What does "...final processing parameter at parallel port." mean?
0
 

Author Comment

by:giggs11
ID: 2607499
a stepper motor need a sequence like 0001 .. 0010 .. 0100 .. 1000 ......... to move to desired place. the problem i'm facing now is isapi only send the final sequence. that mean the motor wouldn't move. i loop the function and send the sequence accordingly will make the motor move smoothly with the help of sleep(). do u have any idea to do that. it works fine under normal dialog based program. thanks
0
 
LVL 1

Expert Comment

by:snifong
ID: 2607965
Nope. Sorry.
0
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
LVL 1

Expert Comment

by:snifong
ID: 2607966
Nope. Sorry.
0
 

Author Comment

by:giggs11
ID: 2608922
Adjusted points to 75
0
 

Author Comment

by:giggs11
ID: 2608923
pls help
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 2613374
instead of sleeping have you tried posting a timer message and then processing each step on the return?



0
 

Accepted Solution

by:
chuckle earned 75 total points
ID: 2629755
You question is a bit unclear:
1. Are the parameters recieved by the ISAPI DLL all at once?
2. How are you sending the parameters to the motor? Windows messaging? COM? API calls?

but I think I can help you:

How good of an understanding of ISAPI do you have? A clear understanding of ISAPI and how IIS processes requests might help you out. A good place to start (which you have probably already found)
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/devprods/vs6/visualc/vccore/_core_internet_server_api_.28.isapi.29_.extensions.htm


It sounds like you might need to implement a worker thread pool in the ISAPI DLL. ESPECIALLY if you are going to sleep during the processing of the request.

Worker threads will allow your ISAPI DLL to recieve responses from the web server and spawn off workers to control the motor. The workers will make sure all of the parameters make it to the motor in the proper order.

There is an excellent article on MSDN about how to implement worker threads.
http://support.microsoft.com/support/kb/articles/Q185/5/18.ASP

If you are building a high performance web application you might want to refine the worker thread concept with a thread pool. There is an excellent article and example on Microsoft's MSDN at:
http://support.microsoft.com/support/kb/articles/Q197/7/28.ASP

Both article are clear and well written and my humble attempts to explain things to you would pale in comparison.

-ece
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

Suggested Solutions

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

820 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