473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Pause and Stop Search

Thank you in advance for any and all assistance. Is there a way to start,
pause and resume a recurrsive search exactly where you left off, say in the
registry programmatically?
--
Michael Bragg, President
eSolTec, Inc.
a 501(C)(3) organization
MS Authorized MAR
looking for used laptops for developmentally disabled.
Oct 16 '06 #1
2 2249
Lookup "thread" in the object browser and/or threading in the
documentation.

Thanks,

Seth Rowe
eSolTec, Inc. 501(c)(3) <esol...@noemail.nospamwrote:
Thank you in advance for any and all assistance. Is there a way to start,
pause and resume a recurrsive search exactly where you left off, say in the
registry programmatically?
--
Michael Bragg, President
eSolTec, Inc.
a 501(C)(3) organization
MS Authorized MAR
looking for used laptops for developmentally disabled.
Oct 16 '06 #2
Hi Michael,

Thanks for your post.

Oh, I find my colleague Gary Chang[MSFT] has worked another issue
"Programmatically Find All Registry Entries" in this newsgroup. After
talking with him, I understand more context information regarding your
current project. Based on my understanding, you are writing a regedit style
winform application which implement registry search function. Now, you want
to implement Pause/Continue/Stop function in the "search engine". If I have
misunderstood you, please feel free to tell me, thanks.

First, in the "search engine", we should define the actual semantic of each
search operations: Pause, Continue and Stop. Normally, Pause operation
allows a search to "Continue" at a later time from the current position,
while "Stop" operation will terminate the current search operation
completely, it will not allow "Continue" anymore, we can only "restart" the
search function again from the start position.

So I assume your question lies with how to implement the "Pause/Continue"
properly.

Since registry is structured in a tree-style way like filesystem, the most
clear way to search it is using recurrsive search as you have known. The
breakout point in a recurrsive function invocation is checked by a "if"
statement, when the condition meets, such as the registry to search is
found. The common recommendation to implement the pause/continue is: once
the registry is found in the "if" statement in the recursion, you may
update the UI to notify the user. The current recurrsive search should not
return from the "if" statement, it should just wait/sleep in this "if"
statement for a further "continue" or "cancel"(abort the entire search
process) instructions from user. Since the recursion function return value
controlls whether the recursion should continue or break, so your
wait/sleep operation in the "if" statement should return corresponding
continue/break value based on the "continue" or "cancel" instructions
passed by user.

As a conclusion, the "Pause" operation can be implemented with a wait
operation in the "if" statement of recursion function, while "Continue"
operation can be implemented by returning a recursion continue meaning
value from the "if" statement. "Cancel" operation can be implemented by
returning a recursion terminate meaning value from the "if" statement.

Hope this explanation is clear. If you have any concern or anything
unclear, please feel free to tell me, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Oct 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: C# Learner | last post by:
What's a nice way to create a non-blocking pause in execution? Will I need to use some kind of timer for this, or is there a nicer way?
8
by: Wim | last post by:
My GUI application starts a process (a console program) when the user hits Play. I would like to add an option to pause that process. The code I've added to detect if the user hit pause/unpause...
2
by: Dave | last post by:
I have a program that I need the program to temporarly stop and wait for a response from a piece of equipment. After a set period I want the program to continue. Like below --execute lline...
38
by: Jackie | last post by:
I just want the programme to stop for a while. Thanks.
3
by: garfunkel214 | last post by:
I have images and text rotating every 7000 ms using a setInterval. i am trying to implement a pause button that will stop the rotation when clicked. When clicked once more, I would like the rotation...
4
by: ravindarjobs | last post by:
hi...... i am using ms access 2003,vb6 i have a form. in that i have 2 buttons 1. start search 2 stop search when i click the "start search" button the fucntion SearchSystem() is called,...
3
by: nma | last post by:
Hi This code goes well with play, stop and fullscreen button, the only thing is the pause button is not there. How to make pause button? I try to make pause button but when it streams video, when...
2
by: keeplearning | last post by:
Hi Friends ! Please view this ANIMATION . I want to control this animation with a play and pause button . when clicked on play button , the animation should start playing . and when clicked...
2
by: manish2007 | last post by:
How Many Differnce Between stop $ pause Sql Server service How Many Service Run On Pause Case
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.