473,386 Members | 1,828 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.

Writing Low Resource Windows Service

I am a Java programmer - but I have had some experience programming in C++
before (3 years on a job) I have need of an application or set of
applications to do the following on a windows machine:

1 - Passively monitor CPU and HD utilization, and if they drop to 0, and X
number of seconds have passed, request the OS (windows) use its time to
cache some files which may be launched. (The files would be user
selectable
2 - Watch for trigger keys which indicate a macro is to be run. For
instance CTRL+ALT+SHIFT+F would bring up F:\My Music\French or CTRL+ALT+S
would run the program "Luc's Nifty Media Management Program"
3 - Define keyboard "shortcut" macros. (These could of course be turned
off.) For instance if I were programming in Java I could (by hotkey) turn
on my Java Macro shortcuts, to allow a key combination like CTRL+T+I to type
TreeSet<Integertr = new TreeSet<Integer>();

I have to be honest, I am a little worried about memory foot print. I know
ATI has a key listener service installed by default that consumes 1.6 MB of
memory!!! WTF? If I start to exceed 400 kb, I might try shoving some
stuff into a DLL - whatever it takes to get that down. (I hate hate hate
bloat.)

2 and 3 are almost the same thing, except 3 requires that I know how to
locate and "type" in the foreground app.

I would need a dedicated configuration keystroke which would initialize a
setup program (it could be console window if that allowed me to reduce
bloat, but a dynamically created window with no nifty graphics shouldn't be
too bad)

This is being born out of necessity. Trying to use window's built in
service of going through and manually setting shortcut keys through the
start menu is downright exhausting not to mention requiring shortcuts to
folders and other things which would not normally go in the start menu just
to make it even possible.

If no one knows of a reasonable freeware application which does these - I am
intending on writing such an app in Dev C++ (an IDE for the standard GNU C++
compiler) I could also download and install the command line .Net
microsoft compiler if it meant I could use some premade code.

#1 may be beyond my programming expertise (ok all three of them are beyond
my expertise, however if I could find a ready made shell which allowed me to
interprit system keystrokes, the hard part would already be done.)

Advice?

--
LTP

:)
Jul 23 '06 #1
2 2175
Luc The Perverse wrote:
[...]
1 - Passively monitor CPU and HD utilization, and if they drop to 0, and X
number of seconds have passed, request the OS (windows) use its time to
cache some files which may be launched. (The files would be user
selectable
2 - Watch for trigger keys which indicate a macro is to be run. For
instance CTRL+ALT+SHIFT+F would bring up F:\My Music\French or CTRL+ALT+S
would run the program "Luc's Nifty Media Management Program"
3 - Define keyboard "shortcut" macros. (These could of course be turned
off.) For instance if I were programming in Java I could (by hotkey) turn
on my Java Macro shortcuts, to allow a key combination like CTRL+T+I to type
TreeSet<Integertr = new TreeSet<Integer>();

[...]

Advice?
Yes, though not really helpful. This newsgroup tries as hard
as it can not to deal with OS-specific questions (such as yours),
but rather with C++ language-only topics, so you'll have more
luck in some of the newsgroups in the microsoft hierarchy.

As a side note -- if the CPU utilization drops to 0
(as in "exactly zero") than no instructions in your program
are executed, by definition.

- J.
Jul 23 '06 #2
"Jacek Dziedzic" <jacek@no_spam.tygrys.no_spam.netwrote in message
news:e8***************************@news.chello.pl. ..
>Advice?

Yes, though not really helpful. This newsgroup tries as hard
as it can not to deal with OS-specific questions (such as yours),
but rather with C++ language-only topics, so you'll have more
luck in some of the newsgroups in the microsoft hierarchy.
That was the purpose of the cross post - sorry though I wasn't trying to
offend you.
As a side note -- if the CPU utilization drops to 0
(as in "exactly zero") than no instructions in your program
are executed, by definition.
Well . . . I could offset that with some sort of threshold like 0.1% or
something. In my defense I will say I was calculating the CPU utilization
on an integer scale, and my program will be so streamlined that it won't
push it over the 0 marker *wink*

--
LTP

:)
Jul 23 '06 #3

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

Similar topics

3
by: Glenn Venzke | last post by:
I'd like to write a windows service. Unfortunately, my company would only spring for the standard edition of VB.NET which doesn't support the creation of windows services. Is it possible to write one...
10
by: Brent Burkart | last post by:
I have an application that needs to write tasks into an outlook task folder. I keep getting the "Access is Denied" error ASP.NET is not authorized to access the requested resource. Which...
1
by: JZ | last post by:
Hi, I've just ran windows update and got Framework 1.0 Service pack 3 and Framework 1.1 service pack 1 (I think it was 1). I'm using VB.Net 2002. Now when I try to view the windows designer...
3
by: Chris Dunaway | last post by:
I am writing a Windows Service that reads and processes files on a set schedule. I want to create a second app that can monitor the Windows service. The Windows service will write trace messages...
6
by: BobAchgill | last post by:
Has anyone had success with writing text using a private font that was not already installed to the system? When I try the example code in NET Framework Developer's Guide called “Creating a...
0
by: dinoo | last post by:
I did not find the right forum to post this issue, please excuse me for this. But I need the help here very badly. I am having a Windows Service in .NET which is accessing a MDB file which is...
28
by: Mark Braithwaite | last post by:
Hi We are attempting to create a dynamic spreadsheet which will extract information from CRM / SQL. We have very limited expierence in creating SQL queries and we would really appreciate any...
2
by: Solomon_Man | last post by:
All, I have a Windows Service application that has database connectivity and needs the capability to let a user know that there has been a db failure. What is the proper way to notify a user that...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.