|
hung_ngole wrote: Can you tell me how to read text from screen (screen text hooking) using VC++?
Look up IAccessible . Also look up like AccessibleObjectFromPoint , AccessibleObjectFromWindow .
|
|
|
|
|
hi,
I start my application (on 2k, XP, NT, Vista) before the shell "explorer.exe" is loaded, meaning also before all user defined processes start, except those run as winlogon notifier packages. The problem is with a new start of the computer all services are loaded before and while the user is logging on. This takes a lot of processor time and my application has some delays I don't want. So my question is:
1) Is there a way to check whether all services, that should run have already started?
or
2) Is there a way (maybe an event) to get the processor idle time? And what would be a critical value for believing that the processor is idle?
2.1) Or is there a way to give my running application a higher priority so that it can use the processor time whenever it needs it?
thank you for you suggestions.
regards
|
|
|
|
|
1 and 2 are certainly do-able - I'd question wether it was necessary ...
You say 'I start my application' .. that implies its not a service (in my mind) - why dont you make it a service, then give it a dependancy of another service lower down the startup chain (that might take experimenting with to find the right one)
'g'
|
|
|
|
|
hi,
I start the application with the an replacement of HKLM->Software->Microsoft->Windows NT->CurrentVersion->Winlogon->Userinit
to guarantee that the shell is not loaded unless my application allows it. It's some application for user checking.
I don't want to run it as a service because it uses an user interface and other stuff, which make it not advisable to do it as a service.
What exactly do you mean by "lower down the startup chain"? Reducing the number of services starting? This wouldn't be acceptable.
|
|
|
|
|
Gurkenscheibe wrote: lower down the startup chain
no, I mean services start up usually in a set order - you make your service dependant on one of these .. but you dont want to create a service .. hmmm
how about using something like this http://www.codeproject.com/system/xyntservice.asp[^] to start your program, rather than the reg key - Im pretty sure you can still start this service dependant on another service being 'started' - that might give you what you need
|
|
|
|
|
Gurkenscheibe wrote: to guarantee that the shell is not loaded unless my application allows it
What about replacing HKLM->Software->Microsoft->Windows NT->CurrentVersion->Winlogon->Shell instead with your app. Your app can then provide it's interface and spawn explorer.exe if user is ok.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
1. As mentioned, when registering a service you can specify that it depends on other services. This makes the service manager check that the dependent services are running before it starts yours.
2. There are a couple of ways to check for idle time. Most are for checking time since last mouse/keyboard usage (which doesn't help you on machine startup).
One that may help is WaitForInputIdle: http://msdn2.microsoft.com/en-us/library/ms687022.aspx[^] You could get the handle of a process you know has to be running before yours (e.g. winlogon or explorer) and wait for it to idle.
If you are using Vista you may want to look at the new task manager interfaces like IIdleTrigger: http://msdn2.microsoft.com/en-us/library/aa380724.aspx[^]
For pre-Vista you may want to look at IScheduledWorkItem: http://msdn2.microsoft.com/en-us/library/aa381216.aspx[^]
2.1 SetPriorityClass: http://msdn2.microsoft.com/en-us/library/ms686219.aspx[^] but i don't think this will help you in any way.
I would try using WaitForInputIdle on winlogon.exe or explorer.exe.
If that didn't work i would write a small service that was dependent on one i knew needed to be started and have your app wait on your service (e.g. either through checking service via service manager, or have service create a named mutex, ...).
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I m trying to make .dll file to be used in labview
but I have problem
thanks to help me
|
|
|
|
|
|
thanks
I had seen it
but I have problem in compiling
I have the string.h in my include dir , but it has a error on it yet.
|
|
|
|
|
Please dont mistake me but seriously,it's the dumbest question I've ever seen. How do people know your struck with string.h? and btw if you dont say the error you get there how do we know it? Can you dispaly the error please? and btw,
Tutorials for DLL are availabe in our own store. You may check it before you click somewhere out Clickety[^]
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
VuNic wrote: seriously,it's the dumbest question I've ever seen.
Nah, how about this one[^]?
I enjoy occasionally wandering around randomly, and often find that when I do so, I get to where I wanted to be [^].
Awasu 2.3 [^]: A free RSS/Atom feed reader with support for Code Project. 50% discount on the paid editions for CP members!
|
|
|
|
|
lol Anything involving VB6.0 should be the dumbest. I admit.
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
Nah, how about this one[^]?
I enjoy occasionally wandering around randomly, and often find that when I do so, I get to where I wanted to be [^].
Awasu 2.3 [^]: A free RSS/Atom feed reader with support for Code Project. 50% discount on the paid editions for CP members!
|
|
|
|
|
Is there any way to permanently show the vertical scrollbar on my List
Control, even when it is disabled, i.e. the number of rows does not exceed
the viewable area?
|
|
|
|
|
MFC VC 6.0 problem.
Could someone help me to fix this?
I changed my computer time and now I am getting this error.
I really do not need the help files at this point.
How do I delete them?
I tried to exclude all help files from compilation but it did not help.
Here is the error message
Making help include file...
'makehm' is not recognized as an internal or external command,
operable program or batch file.
'makehm' is not recognized as an internal or external command,
operable program or batch file.
'makehm' is not recognized as an internal or external command,
operable program or batch file.
'makehm' is not recognized as an internal or external command,
operable program or batch file.
'makehm' is not recognized as an internal or external command,
operable program or batch file.
Error executing c:\winnt\system32\cmd.exe.
Thanks for reading
|
|
|
|
|
In FileView, select the files you want to remove from the project, then press Delete.
|
|
|
|
|
I wish it was that simple.
It does not work.
I still get the same errors.
|
|
|
|
|
makehm.exe is called by makehelp.bat, which you will find is invoked in the custom build settings for (project_name).hpj. It is the file that processes resource.h to extract resource IDs to make many of the automatic help links of MFC work (e.g. pressing help in a dialog).
So if you do as Mike suggests and delete (project_name).hpj from the project the problem will disappear. However the cause is a worry if you ever do want to build help files as makehm.exe is a Microsoft utility located on my machine at
C:\Program Files\Microsoft Visual Studio\Common\Tools
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
Thanks for reply. It is getting little more complicated. My .hm file just vanished from my project files. I just copied it in from another project (I think that is not the best way to do that, but it works for now).
Now I am getting Cannot find "hcw" ..., but it aventually compiles.
I think the real issue is that my date of \Debug directory "creation" changed to year 2020 ( don't know how) and now the compiler wants to always recompile beacuse it thinks it is out of synch.
Funny part is tha the actual files have correct date, just the directory is messed up.
So, anybody knows how to "roll back " the date?
I'll try to buil Release and the rebult the Debug, maybe that will work.
|
|
|
|
|
Vaclav_Sal wrote: .hm file just vanished from my project files
You don't need the .hm file to be there, it is an output from the build. One from another project is almost certainly useless - it is made from your resource.h file.
Vaclav_Sal wrote: Cannot find "hcw"
hcw.exe is the microsoft help workshop, on my machine located at
C:\Program Files\Microsoft Visual Studio\Common\Tools
so it sounds as if you have a corrupted VS installation.
Vaclav_Sal wrote: date of \Debug directory "creation" changed to year 2020
You can simply delete the debug directory - it should be recreated at build time if it isn't there, but I doubt that the /debug directory creation time has anything to do with things.
Did you delete (project name).hpj from the project? If you go into project settings, for this file you will see a custom build step that invokes makehelp.bat, you should find makehelp.bat in your project directory, and if you have a look inside it you will find where makehm.exe and hcw.exe are called. Deleting the .hpj file from the project will stop this custom build step.
As I said before, I think that you have a corrupted VS installation and rather than keep chasing these things, I'd reinstall.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
Can't you just change the project's dependency list (so that the "help project" is no longer part of that list)?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
This is why I asked all these silly questions.
a) I have no .hpj file nowhere in my project - so I cannot delete it.
b) There are no dependencies on help anything
c) I did reinstal my VC and it still fails.
d) I do not see any "customization" ( in Settings) regarding help files.
Basically - unless I edit make file I am stuck with this.
BTW I did compile the help file without any problems on different mashine but every time I want to run the debugger I have to recompile because files are "out of date".
Time to start over with my project.
Thanks for all your help.
|
|
|
|
|
Vaclav_Sal wrote: b) There are no dependencies on help anything
Have you verified this?
Vaclav_Sal wrote: Basically - unless I edit make file I am stuck with this.
Are you indeed using a makefile?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
How can I get an executable program in cygwin from a source code made in c, who has many subfolders?
|
|
|
|