|
I thought it was obvious that I'm talking about Windows, especially considering the fact that this message board is called "Visual C++".
Anyway, I need to do it programatically, so I can't just launch a second process, or make it a manual operation for the end user to do.
|
|
|
|
|
In fact I replied to your message (but shows "Ananymous" as I di dnot log in while replying)
redindian
|
|
|
|
|
As you know the server IP + port ,you can filter the netstat -p command's results and find if the port is established or not . Right ?
redindian
|
|
|
|
|
I don't want to establish a connection - it confuses the server, because I don't follow the protocol. I just want to detect the presence of an open port on a particular IP address.
I've found the TCP state charts, and it seems that all I need to do is to send a TCP/SYN-message, and wait for a TCP/SYN_ACK message. Then I know there is a process listening on that port. Then my plan is to send a TCP/RST to reset that connection sequence, thus preventing the server from acquiring a socket.
|
|
|
|
|
|
Thank you for that link! Unfortunately it makes use of win/libpcap, which has a rather fascist license requirement, which states I must reproduce the copyright information. :grumble:
It's on my list though, in case I don't find something else. So, once again, thank you!
|
|
|
|
|
|
I m planning to write a Voip dialer that can be used as net 2 phone dialer. Can any one provide me any kind of source code for this?
|
|
|
|
|
Hi,
How to Remove Help button from CPropertysheet. i have tried in this way, but no result. help me in this regard. Urgent.............
sheet.m_psh.dwFlags &= ~PSH_HASHELP;
page1.m_psp.dwFlags &= ~PSH_HASHELP;
page2.m_psp.dwFlags &= ~PSH_HASHELP;
page3.m_psp.dwFlags &= ~PSH_HASHELP;
page4.m_psp.dwFlags &= ~PSH_HASHELP;
sheet.DoModal();
it is still appearing.
bye
|
|
|
|
|
|
Hi
I am having problem about EndRequest()function of class CHttpFile Function.it is
taking too much time to execute..Instead of that if i am using Win
APIs it is running ok...
I am getting response but is taking much time that is the main problem
it takes apprx. 1 min.
So Can any body suggest me what can be the problem..?
sonani prakash
|
|
|
|
|
hello a small question,
given a handle to a window, is it possible to determine which type of window it is? like combobox or listbox or editbox e.t.c. and how to type cast the CWnd object for that handle into its corresponding class's object.
|
|
|
|
|
You can get the class name from GetClassName. Then you can cast your CWnd to the appropriate derived class.
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
|
a simple question...
how to generate random numbers by rand() within a given range...
let say between 20 and 40
thanks
|
|
|
|
|
Hello,
Does:
srand( (unsigned)time( NULL ) );
int nNumberBetween20And40 = (rand() % 20) + 20;
(rand() % 20) gives you a number between 0 and 20.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
I need to get a fully qualified name of the host machine.(Eg: Shivaeb.invent.co.in)
I tried using gethostname() API, but it is returning only the machine name(Eg:Shivaeb) not the fdqn name(Shivaeb.invent.co.in).
Could any one suggest any API or any logic to get the fully qualified name of the PC?.
Thanks & Regards,
Shiva
|
|
|
|
|
use this code
char ah[100]={0};
gethostname(ah,100);
hostent* kk=NULL;
kk=gethostbyname(ah);
|
|
|
|
|
Thank you for your reply.
I tried with that code but what is happening is even hostent h_name member is also having the same hostname as returned by gethostname() API.
There is one more API getnameinfo(), which this also i could not get the fully qualified name of the host machine.
Could you please suggest me some other solutions?.
Thanks & Regards,
Shiva
|
|
|
|
|
Shiva,
I wonder how it is not working. I've tested code on my m/c.
see description of hostent on MSDN, too.
h_name
Official name of the host (PC).If using the DNS or similar resolution system, it is the Fully Qualified Domain Name (FQDN) that caused the server to return a reply. If using a local “hosts” file, it is the first entry after the IP address.
I've given up.
leaving for the day and weekend. Happy ganesh chaturthi
-- modified at 9:36 Friday 16th September, 2005
|
|
|
|
|
prasad_som wrote:
leaving for the day and weekend. Happy ganesh chaturthi
Happy Ganesh Chaturthi, Dear
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
hi,
Is there any thing with DNS Server configuration?.Because i m not all getting fully qualified through all the API's.
One more doubt.How do we know host name is get from the 'hosts' file or from DNS Server?.
I tried checking nslookup command. It is not responding with my machine name only.but when i try with fully qualified name of the host, it is getting the response.
Could you please check your machine how it is responding with nslookup utility?.
Thanks & Regards,
Shiva
|
|
|
|
|
I know that it have 7 layers which is Physical, data link, network, transport, session, and presentation. Can tell me mewtocol is in which layer?
|
|
|
|
|
I want a simple code which display popup messgaes from
task bar at a particular time.
Plz give a simple solution.,
(Plz do it in a simple dialog)
Don't give unnecessary code.
Praveen Chowdam Kumar
|
|
|
|
|