|
It seems not to be a good idea to put recvfrom in an infinite loop.
My solution:
(before calling WaitForEchoReply in CPing::Ping)
m_dwStart = GetTickCount();
m_dwStart is a private member of CPing.
(in the for(;;) loop)
if (GetTickCount() - m_dwStart > 1000)<br />
{<br />
break;<br />
}
|
|
|
|
|
I am beginner programmer from Polish. I began work over my newprogramme and I hit on little trouble. I must place data (HTML code) in indicator WebBrowser2. Does not go me here for loading of file HTML from disc with method Navigte( 2,...). I want to know how must I implement a code to transfer HTML code from board eg CStringArray to WebBrowser2. If You can help, please write back.
|
|
|
|
|
Hi
I am system Administrator.we are supplying internet to customers.how can i control the bandwidth supply to users ,of varying subcribtion.
Now every customer is getting the full bandwidth regardless of his subcribtion.Please help in this matter.
can we control the bandwidth speed thru server programming like ASP or XML.
with regards
balaje.R.P
|
|
|
|
|
Not the right place to ask such a question.
|
|
|
|
|
Please help me in finding the ip of the local host.
-C
|
|
|
|
|
127.0.0.1
|
|
|
|
|
TRY:
void DiscoverLocalIP()
{
TCHAR szHostName[1024];
//first get the local host's name
int res = gethostname(szHostName , 1024);
if (res == 0)
{
//then get the host's information by its name
HOSTENT *phost = gethostbyname(szHostName);
if (phost)
{
//phost->h_addr_list records the host's IP array
for( int i = 0; phost->h_addr_list[i] != 0; i++ )
{
//here we get each of the host's IP which is in network byte order
ULONG ulIP = *(ULONG *)phost->h_addr_list[i];
}
}
}
}
Don't forget to initialize WinSock library before call these WinSock APIs.
BTW,127.0.0.1 is only the roll_back address.
Cheers
|
|
|
|
|
loopback..
|
|
|
|
|
Dear Sir
How to get the ping result shown with current time and continuously get result at a time interval like 15 minutes?
Shown like this(15 minutes interval):
Reply from:123.456.12.34; bytes=32 time=1111ms TTL=123,at 12:00am,05/19/2002
Reply from:123.456.12.34; bytes=32 time=1222ms TTL=123,at 12:15am,05/19/2002
and so on.
Thanks a lot!!!!!
XYZ
|
|
|
|
|
It's a bug, I know about it and when I get round to updating it I'll fix the code.
Normski. - Professional Windows Programmer
|
|
|
|
|
Hi Norm,
great class, but there's one simple but effective problem... Under Windows 2000 you can only send a ping as an administrator (and so does WinNT4 i guess...).
Under WinNT4.0, MSDN gives a workaround.
Any ideas for win2000 ????
thx,
Olli
|
|
|
|
|
I've just had an quick look, and found CPing class by P.J.Naughter - it uses IcmpSendEcho function for ping-ing. It does work on WinXP. But I think, that this function is not included on Windows 95/98/Me/NT.
|
|
|
|
|
i've tha same problem, i've noticed there's no way to work with setsockopt and sendto too under winNT4 without administrator accounts. All works fine by using administrator account, but it's not a solution.
Can someone tell me a trick to solve the problem or just a place to find more infos??
thanx D
|
|
|
|
|
|
I guess the thread is wrong anywhere. I test it on win98, and it does work!
|
|
|
|
|
Hi All,
I have a process which needs to know the CPU usage and Memory consumption of the process itself as well as other known processes in the system.
Can anyone help me and tell me on All windows based OS how this can be done.
Thanks in advance for any help.
A Guy
|
|
|
|
|
In your winping program you had a great class for handling your combo box. I've added the class to my program yet when I add selection to the combo box, then choose the down arrow it leaves a blank space then the new selection and any others that I may have typed in. Where are you setting how many positions are in the combobox? Hope this makes sense.
Tom Wright
Network Technical Services / Programmer
tawright915@yahoo.com
|
|
|
|
|
How to find the Machine IP Address.A function which finds the Maching IP address.
|
|
|
|
|
I presume the input is machine name. If so, we can find the ip address using the following Win32 API's.
GetMacAddress(strMachineName, F1, F2, F3, F4)
where F1..F4 are of type BYTE and strMachineName is a char*.
The result 'true' indicate, successfully executed the command.
|
|
|
|
|
WSA Error 10044 comes out
when run in windows 95
may i know what is the cause and how to solve it
thanks
|
|
|
|
|
Anonymous wrote:
WSA Error 10044
Error code means that you tried to use an unsupported function. This will most probably be due not having Windows Sockets version 2.0 (or greater)installed. Go to the microsoft web site and download the latest version of Wsock32.dll. This should fix the problem.
|
|
|
|
|
I am looking for a simple project, in VC,
the project shall allow the user to build a TCP/UDP packet via a GUI and then with the simple press of the button the packet shall be on the way
ideally the user will be sinding a ICMP packet and the user can fill the fields of the packet as he wishes
supershah
|
|
|
|
|
I have written an app that works ok on most networks , but one is prooving to be particularly unreliable. Given that I can do nothing about the network I am trying to beef up my code . On a simple CRecordset Open I have a try and all the catches I can think of .It uses a simple select statement. To test the code I run the app , disconnect the network prior to the open and see what happens. And what happens is not reliable . Sometimes my CDatabase exception handler is called , sometimes an SQL timeout message box appears. Click the box and it all recovers ok when the network is reconnected. This application is to work with no user intervention , and must be very reliable. Any ideas ?
I have tried debug /release versions with no optimisations , I have tried single and multithreaded versions , I have tried TCP/IP and multiprotocol with the latest MS SQL Server 7 driver .
|
|
|
|
|
When the winping utility is open for piniging two servers.. the result displayed is jumbled.. how do i trap the correct reponse?
Can i ping two servers from the same program?
Thanx
Borj
|
|
|
|
|
I'm afraid the ping utility deals with only one server.
|
|
|
|