|
Thanks all for the Reply.. Leave the case when monitor is not connected.. Then , What about the standy by ? Is it possible ?.. (If possible i can run some programs when monitor is OFF )
Regards
Krishnadevan.K
IF u can Dream it ... U can do It.....
|
|
|
|
|
With regards to standby. This is governed by power management. I personally have no experience of power management on windows and therefore do not know any API calls that could be made. I would have thought that these do exist however.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Correct, a plug and play monitor can give you some info. (I'm not sure how much), but many monitors are not plug and play. If you stick to new machines this is unlikely to be a problem, but as soon as your software hits any test lab I've been in, most of the monitors it deals with will not be plug and play.
|
|
|
|
|
How about running them when the screen saver is active?
You can detect if screen saver is active, and I think, event set your app up to be notified when it has gone active.
|
|
|
|
|
Running a program when screen saver is active , doesn't mean knowing monitor status(An what happend if screen saver is disable ? ).
However its one option..
Now i am looking it to PowerManagment & hopes get some way to it ..
Regards to ALL
krishnadevan.K
If u can dram... U can do it..
|
|
|
|
|
Hello,
I want to check whether an IP address i alive or not .. like the ping... i m using GetRRTandHopCount() method to determine whether the IP address i m sending to this function is alive.. in case it get the response it return true otherwise false. now probelm is that if the IPAddress dont exist in LAN it return false very quickly.. and if it is alive it gave a quick response.. but if an IPAddress falls in the range of that is allocated to lan then this function respond very slowly...
is there any way to improve the response time or someother function that can be used for this purpose
|
|
|
|
|
Why not actually do a ping (ICMP echo)?
You could then use IcmpSendEcho() which has a timeout in milliseconds that can be set.
See the IP Helper Reference[^] for the other Icmp Echo functions.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Antony M Kancidrowski wrote:
Why not actually do a ping (ICMP echo)?
This might have been a viable solution 3+ years ago, but servers of late have turned off PING replies. So even though you PING a valid, working server, if the server has PING replies turned off, you'll get no reply, making it look like an invalid address.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Quite true.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
i used the that function and it gives me error
the procedure entry poingt createfile could not found in the dynamic link libaray iniphlpapi.dll...
Plzzz suggest some solution soon
|
|
|
|
|
Without seeing your code it is hard to say what the problem is.
Ensure you have included these headers
#include "iphlpapi.h"
#include "winsock2.h"
#include "icmpapi.h"
and you are linking to these libraries
icmp.lib
Ws2_32.lib
NOTE: You need the winsock2 stuff if you use inet_addr() to generate the destination address.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hi,
Is there ate any alternate option available instead of STL List. I have created template class, also tried with Linked List. But it's search option is very slow. Let me know good suggestion from you.
Regards
Rajesh
|
|
|
|
|
hi Rajesh..
I am doing a projec based on broadcasting.it means simultaneously passing the message to all the clients in the intranet.ie;server broadcasting the message to all the clients.got to do it in the windows platform ie;vc++.
Kailai
|
|
|
|
|
Have you tried any of the other STL container classes, I think a set should give you faster lookup times.
|
|
|
|
|
No, But i want alternate for STL classes.
Be simple and Be sample.
|
|
|
|
|
std::map - when doing lookups
std::vector - could be used if you are using fixed index
|
|
|
|
|
i think you don't even undertand what is STL classes .
std:: is the namespace defined by the C++ for the standard library, and unfortunately (for you), map s and vector s and classes from the Standard Template Library (also said STL )...
so please, read the posts before you answer them
see you
TOXCCT >>> GEII power
|
|
|
|
|
Curiously, Why do you need an alternative to STL? What prevents you from using STL? Why is it a bad thing?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
My friends are saying the Usage of STL List makes more weitage to your application. Especially on Linux. What about ur suggestion?
Regards
Be simple and Be sample.
|
|
|
|
|
it depends on what you need also...
i can suggest you to write your own containers if you think you're able to, otherwise, i don't know such alternative based on the standard C++.
Off course, there are lists in MFC for example, but not available under Linux (and certainly not even lighting your binary...).
can't help you more, sorry...
TOXCCT >>> GEII power
|
|
|
|
|
Hi
Currently I am building an app that receives frame input from a camera and performs some computations on it. My problem is, my app is currently processing the frames as fast as possible, and that makes the computer's response very slow for other apps, i.e. my application work like this:
while(app not closed)
getinput();
processinput();
displayoutput();
end while
Since this app may be run on a PC for hours and I don't want to disturb other apps' processing, is there a way for my app not to hog the CPU power while it's running, provided I can tolerate some drop in the frame rate?
Thanks!
|
|
|
|
|
Perform the processing in a low priority thread. It will use all the CPU it can, but if a higher priority thread needs the processor it will get it.
Mike
|
|
|
|
|
Indrawati wrote:
while(app not closed)
getinput();
processinput();
displayoutput();
end while
make it (not so good)...
while(app not closed))
{
PollOnSomething(event)
process()
display()
Sleep(0);
}
make it (better)...
while(app not closed))
{
WaitForSingleObject(event)
process()
display()
}
...or better why not using normal windows messaging, post yourself a message e.g. WM_APP when "input" is available and handle it in a messange handler.
|
|
|
|
|
As has been pointed out, running the loop in a separate thread is probably the best solution. If you don't want to use multiple threads, see the section "Responding to user input while performing a long task" in this[^] article.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hai frens,
Do any body know how to control the enlarge and shrinkage of our application as a result of the change in the resolution of the monitor ?
Plz let me know, some solution to scale our application depending on the resolution of the monitor using MFC. . .
Thanx
|
|
|
|