Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2000-03-10
8
Medium Priority
?
238 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 150 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

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!

Question has a verified solution.

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

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 goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses
Course of the Month12 days, 3 hours left to enroll

916 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