|
You can't do anything You can't spy them thru' normal means. If it is possible it will be very difficult
|
|
|
|
|
Thanx for helping Sir .
VIKS
|
|
|
|
|
How do you tell how long a function takes to run? Something like you start a timer, then call the function, then read the timer when you have broken out of the function.
-Raffi
|
|
|
|
|
If you're satisfied with a rough measuring, this will do:
DWORD dw=GetTickCount();
f();
dw=GetTickCount()-dw;
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
what about something like:
int i = GetTickCount();
SomeFunction();
int usedtime = GetTickCount() - i;
Just be aware that when the computer have been running for about 40 days, GetTickCount() starts from zero again...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
sounds good. thx
-Raffi
|
|
|
|
|
You might find the Timing and Profiling with Visual C++ section of this article useful:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvc60/html/optcode.asp
|
|
|
|
|
A high-resolution timer can be found here on CP:
CCPUTicker v1.22
/moliate
Two o'clock and walking through familiar London - Or what was familiar London before the cursor deleted certain certainties -
I watch a suit and tie man giving suck to the Psion Organizer lodged in his breast pocket
its serial interface like a cool mouth hunting his chest for sustenance, familiar feeling, and I'm watching my breath steam in the air.
Neil Gaiman - Cold Colours
|
|
|
|
|
I'm working on a small project which requires 2 controls to fit in a window and be resized with sizes being relative to the size of the window and the other control.
First I'll state that I'm using only Win32 in plain old C and the controls in question are a Dialog Box which contains a tree control and a text control.
I guess I'll split my question into two parts.
1) What is the standard way of dealing with window resizing and contained controls. Dealing with 1 control is easy though any more and you have to deal with some math and possible diagrams just to make sure the resizing operation works as one might expect.
2) I've seen in some applications partitions between controls which let you resize adjacent controls based on left/right or up/down movement (sorry I have no clue what they are called). Does such a thing exist in the Win32 libraries or do I have to come up with it on my own. If I have to come up with it on my own I was thinking of using a plain button as I already know how to work with those. Does anyone have any suggestions or ideas how to solve this rather old yet simple problem?
Sean
|
|
|
|
|
There is a nice implementation using the C in the www.wdj.com magazine. Search the site, if you cannot find it, email me I think I downloaded the sources - I will search my hard disk!
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
Hi all,
When do we need an empty class like?
class Foo{};
thanks in advance
regards
/rsasalm
|
|
|
|
|
Never, except in examples where we need a dummy class to show it's use, or visibility.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Christian Graus wrote:
Never, except in examples where we need a dummy class to show it's use, or visibility
Sometimes in defining exceptions they are useful.
|
|
|
|
|
They have a role sometimes:
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
How to determine whether the new request header is coming from client in HTTP/1.1 Keep-alive Connections ?
|
|
|
|
|
Looking at the header and check for "Keep-Alive:" ?
|
|
|
|
|
How to check whether this is a NEW http-header ?
Do I have to check EVERY message or just the first ones?
|
|
|
|
|
M A V wrote:
How to check whether this is a NEW http-header ?
As opposed to what? An OLD HTTP-header?
Of course you have to parse every request the server gets.
If your question is instead "How do I know if it's a 1.1 or 1.0" request: Well, read the header. It's all there, in plain-text format. It's either "HTTP/1.0" or "HTTP/1.1".
Maybe a trip to this place can clear things up? Especially this page might prove useful.
|
|
|
|
|
How can I determine whether the data that was just received, is a HTTP-header?
I am writing HTTP proxy server application,it works ok with HTTP/1.0 and fails with HTTP/1.1...
For example, when the page contains some data wich needs to be loaded from other server this data is not displayed.
I think that browser, when configured to use HTTP/1.1 sends it's requests one after another without breaking the connection.
My code looks like:
Thread1(started on every connect from client):
recv(...);
// parse header get URL_to_connect
_beginthread(Thread2);
// wait here for Event..
while(!Thread1done && !Thread2Done)
{
recv(...); //from client
send(...); //to server
}
closesocket();
//Thread2
connect(server_ip);
// fire the Event...
while(!Thread1Done && !Thread2Done)
{
recv(); //from server
send(); //to client
}
closesocket();
I've read RFC, but found nothing concrete about this...
|
|
|
|
|
AFAIK you can't just recv() + send() to pass on any data to any server. You need to parse every request sent from the client to see f.ex. what server to pass on the request to.
|
|
|
|
|
Can anyone help me to detect the code pages of text strings?
I wish to know so that I could convert to and from!
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
If the only information you have is the strings themselves, you are out of luck. There is no way, short of reading the text, understanding what language it is and then start guessing what codepage for that language it uses.
|
|
|
|
|
How about if I have the text file?
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|
|
You still only have the characters (the "text"). You can't possibly know anything about what language and code-page was used to produce that file without some kind of meta content, wether in the text itself or as an alternate stream for the file or whatever).
|
|
|
|
|
The "Advanced Save As..." dialog in the VS.NET seems to indicate the correct codepage. What is the magic here?
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
|
|
|
|