Solved

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

Posted on 2000-03-10
8
235 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: 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!

 
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

630 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