|
You have said the following...
~~~~
Isn't that the whole reason for using a host name rather than an IP address (to not be affected by IP changes)?
~~~~
I was not sure the scope of these functions but i thought you were saying there is more that this.
So, i hope you said the reason for using a host name than an ip address is to find the address.
am i confusing?
I should have said YES. but is there any other reason?Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
unsigned char ip,i,j;<br />
pHost = gethostbyname("google.com");<br />
for( i = 0; pHost!= NULL && pHost->h_addr_list[i]!= NULL; i++ )<br />
{<br />
for(j=0; j<pHost->h_length; j++)<br />
{<br />
ip = (unsigned char)pHost->h_addr_list[i][j]; <br />
fprintf(f,"%d %u\r\n",ip,ip);<br />
str += itoa(ip,ipc,10);<br />
str += ".";<br />
}<br />
str+=ctrl;<br />
}<br />
alert(str);
so i changed unsigned to unsigned char(i did not check it properly)
and i could get googles ip addresses but still the one which i saw in
ip-adress.com did not appear. when i used gethostbyaddr i got bom01s01-in-f147.1e100.net which is
also googles for this ip 209.85.153.147 . why only four appears for gethostbyname?
if this is beyond the scope then we can drop this.Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Jayapal Chandran wrote: ...i could get googles ip addresses but still the one which i saw in
ip-adress.com did not appear.
Your IP address and Google's IP address are not going to match. Why would you think otherwise?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
was just curious. anyway. i need to learn more to understand these behind the scenes.
Meanwhile, i want to know what IDE has options like designing the user interface like in vb (visual studio 6.0). currently i am using DEV-C++ and the compiler is mingw for win32. I have to run the program to see how the width and height has been set for any control i create. I tried VS 6.0 but couldn't design a window. I am asking something like glade. Or do i have to migrate to VS 2003 or greater. I want to run my programs without the .NET framework. As i said i am a novice w.r.t .NET... a little of c# i have did. ?Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Jayapal Chandran wrote: Meanwhile, i want to know what IDE has options like designing the user interface like in vb (visual studio 6.0)....I tried VS 6.0 but couldn't design a window.
This makes no sense. Unless you did something just completely wrong, any version of VS will work.
Jayapal Chandran wrote: Or do i have to migrate to VS 2003 or greater.
If you don't require MFC, you might want to download VS2008 Express."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Oh. Thanks. I should consider that untill i tend to program the shell. I hope MFC is ideal for that.
meanwhile, i was looking at your other replies and came across turbo c.
I want to stop file creation in windows. I want to try the interrupts like i did in dos. KBD events, mouse, the screen interrupts. and the most needed int 21. besides these i enjoyed the terrific TSR. But how do i do that in window. I am trying to understand the shell concept so that i can write the registry to make my program appear in all context menus like winzip or notepad++. I am still lagging many topics. If you dont mind then please can you drop me some references. These are the things i was doing in Ms-Dos. At one point i cannot read write the far memory that is beyond 64kb. There were DPMI but i thought better to migrate to 32 bit c programs instead of being in 16 bit and trying beyond the scope topics. phew. sorry.Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Jayapal Chandran wrote: I want to try the interrupts like i did in dos. KBD events, mouse, the screen interrupts. and the most needed int 21.
Windows is going to keep most of that away from you.
Jayapal Chandran wrote: besides these i enjoyed the terrific TSR. But how do i do that in window.
The concept of a TSR in Windows does not exist, at least not how it was defined way back then. Windows has many processes that run "simultaneously." Creating another process is trivial.
Jayapal Chandran wrote: I am trying to understand the shell concept so that i can write the registry to make my program appear in all context menus like winzip or notepad++.
See here.
Jayapal Chandran wrote: At one point i cannot read write the far memory that is beyond 64kb.
No such thing in Windows. Far pointers went away with the 32-bit OS."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Yes, i read somewhere that TSR (the same way) cannot be done. but still. i want to moniter the processes which creates files and certain other processes. Thank you for the registry link. That is the first concept i did after coming here (32bit). I created tabs and radio buttons to restrict the users using certain options like right click on desktop, changing background, folder options. I want to program the explorer shell.
anyway. am i querying too much? beyond the scope of this thread? but despite that i get the answers and you are gladly helping me. How do you take it when there are lots of queries to your personally. It is going like consultation. Thank you a lot. and you can stop me anytime you want but if you really want to.
Next thing is i am writing a tray popup which will ping my server to see for any recent mails. IMAP.
I have experimented using PHP.(because a single function does a lot of work and easy to see the final result but i want a real window program to do that. so i all the networking stuff with php and then i implement in win32). The one draw back is negotiating with the TLS. IF i want to ping my server then that is fine. But if i want to ping google to see my mail status then i have to work with the certificates. This is the idea i assume that i should do if i have to deal with google. I hope c# could have options for doing this. But how about third party libraries for win32 to deal with TLS. Could you drop me some references? meanwhile i am still searching the internet and will continue searching till it is solved. Interesting all these network stuffs. ain't these? . ha.Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Jayapal Chandran wrote: I want to program the explorer shell.
Check out Michael Dunn's articles about that subject.
Jayapal Chandran wrote: anyway. am i querying too much? beyond the scope of this thread?
Yes, the thread subject is long gone. Feel free to start a new thread when you have other matters to discuss.
Jayapal Chandran wrote: How do you take it when there are lots of queries to your personally.
I answer few, if any, personal questions. If you mean directly/specifically to me, if I see the posts and have something useful to provide, I will. That way everyone benefits."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Yeah, specifically/directly/technical . Ok. I will maintain that. Thank you a lot. . Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
I was trying to get the ip of host name using getaddrinfo. The linked list updated by this function (addrinfo structure)has sockaddr type which has only to types. How to find ip from hostname using getaddrinfo?
MSDN has stated that it is better to use getaddrinfo instead of gethostbyname.Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Of course you can; I wonder where my brain was the other day? txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Yes. i am experimenting all. thank you. Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Your question prompted me to revisit the use of the various network functions, which I have had no occasion to use for about four years. I spent all evening working on some associated code and think I now understand them as well as I did then (obviously not completely), so thanks for telling me what can be done, and pushing me to relearn what I had almost forgotten. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Then how it is working?
Actually, i update my win32 program with the latest ip address of my shared hosting.
Instead of this i want to resolve the ip in my program.
The address what i dot from ip-adress.com is the same as the one which i got through the snippets provided here. Then what would be the variation in resolving a local address and resolving using DNS...
Only if our ISP updates the addresses we will get a copy of those... How to fetch from DNS...?
There are lots of questions in a whirl #@*& Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
I think David has explained this, and also pointed out my mistake. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Hello,
In C++ Windows programming , I need to make CheckBox(IDC_CHECK1)control transparent on dialog..I have applied a background image to this dialog using pic control and on top of it added auto checkbox. I want to make checkbox's text transparent on the dialog window so that background image is visible even after (checkbox's)text is written on it. I have made checkbox's 'transparent' property true but it's not helping me out. Tried to use getlongwindow() and setlongwindow() API's too...
can anybody help ?
Best Regards,
Supriya Tonape
|
|
|
|
|
|
|
Hi,
Strange issue a colleague and I have been having intermittently since last week.
Basically, after debugging a C++ console app in Visual Studio 2008 (usually via F7 to rebuild after making a code change), sometimes the command window stays open and cannot be closed by any method we can think of. Running the application in debug again opens a new command window. Windows will not reboot once one of these zombie window is there, the machine has to be powered-off. This has occurred with 3 different applications so far.
Process Explorer tells me "Unable to find the window's owning process in the current process list" when I "target" the window with "Find window's process".
I found this thread after a bit of Googling:
http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/e6d4a4f5-7002-401a-90e1-6174d7f9e3ca[^]
Anyone else experiencing similar? Tempting to blame last week's Patch Tuesday...
|
|
|
|
|
At least two of my colleagues started to experience the same annoying problem recently. Looks like this is caused by one of recent MS security updates.
|
|
|
|
|
I've also noticed this, but in VS2005 instead. I've got 4 orphaned consoles now. Was about to simply power off my machine. Got the same "Unable to find" message with Process Explorer.
|
|
|
|
|
I'm having the same problem and I believe it started to happen after MS Windows update last week or so.
|
|
|
|
|
The solution seems to be to uninstall KB978037.
If anyone knows how to escalate this issue with MS, please let me know. We have a minimal code sample that allows the zombie window problem to be readily reproduced. See the MSDN forum link in my original post for more info.
|
|
|
|
|
Thanks. Uninstalling KB978037 update fixed the problem for me.
|
|
|
|