|
Any ideas on how to retrieve the hostname of a Windows server or workstation on the local workgroup or domain FROM the ip address only? What is the SDK/API function for this?
I want to use InitiateSystemShutdown() and other SDK functions which take the hostname in the format "\\name", but I only have the IP address to start with.
BOOL InitiateSystemShutdown(
LPTSTR lpMachineName, // computer name
LPTSTR lpMessage, // message to display
DWORD dwTimeout, // length of time to display
BOOL bForceAppsClosed, // force closed option
BOOL bRebootAfterShutdown // reboot option
);
The IP address is static and is on the LAN, so firewalls/proxies/NAT/etc. are not an issue. My local computer will not have any hostnames configured in its hosts/LMHOSTS, and will (probably) have to browse or query the remote computer.
thanks in advance! (sorry if my terminology is not completely Microsoft-esque)
Andrew
|
|
|
|
|
Use inet_addr and gethostbyaddr.
Example:
int main(int argc, char* argv[])
{
WSADATA d;
WSAStartup(MAKEWORD(2,2), &d);
char szIP[] = "1.2.3.4";
long ip = inet_addr(szIP);
HOSTENT *pHostent = gethostbyaddr((char*)&ip,4,AF_INET);
if (pHostent)
{
printf("%s is %s", szIP, pHostent->h_name);
}
return 0;
}
|
|
|
|
|
I need to create 20 users on 2 pc which run win 98. Also I want all the users to share same policy and tweakUI settings. Is there any way of automating this kind of user creation?
thanks
(sorry for my bad english)
Cihan Karadag
|
|
|
|
|
Lately, Windows Explorer in XP has started crashing on me, and there seems to be no apparent pattern to the crashes. It might happen when I select a file, or select a folder, this morning it crashed when I clicked on the Start button. It does not seem to be linked to any particular file type either.
After digging around in the event logs, I noticed that for (almost) every crash event that is logged, there are a number of events related to the "Remote Access Connection Manager" service, stating the the service: 1. "has entered the stopped state", 2. "been sent a start control", 3. "has entered a running state"
It appears that the two are related. How? I don't know. It may be that the Explorer crash cause the service to stop/start, or the service is crashing and taking Explorer with it, or they may not be related at all.
I reinstalled SP1 a couple of days ago and all seemed fine, until this morning when it happened again.
I was wondering if anyone has experienced (XP = experience ) this and/or knows of anything else I can try, before I get fed up and reinstall.
Clones are people two.
|
|
|
|
|
I don't have a lot of experience with XP. Most of my work is done on W2K. However, I have found that at least once a year, blow out your entire windows system and start over. You'll be amazed at how fast your system seems when you do this. The down side is that you have to reload all of the patches and your software again.
Of course it goes without saying that you should backup all of your data before you blow your system out. One way to make the process less painful is to reload your entire system. Apply any patches and install any software that you will ALWAYS want on the system. Don't do any work on your system until you have loaded everything you will need for a base system. Once you have your base system installed and configured, make a duplicate copy on a second hard drive with something like Ghost. Remove the ghosted drive and set it aside. Now whenver your system becomes really slow, you simply install the ghosted "master" drive, backup your data to it, and then copy the "master" onto your operating drive using ghost. This boils your system reload down into a couple of hours instead of days or weeks in my case.
|
|
|
|
|
Good advice, I like to do this myself (clean install every so often), but I've only been running this installation for about 4 month now. I've previously run W2K for over a year with no problems whatsover, maybe I should go back...
And each time I do a reinstall I say "this time I'll image the disk and keep a backup", but never do
Clones are people two.
|
|
|
|
|
I usually have 8 - 10 programs running and displayed in the System Tray. Explorer.exe tends to crash and restart regularly - notably every time I try to explore a computer in My Network Places that isn't currently available - and it doesn't restore all of the icons to the Tray when it restarts. My only options are to restart the PC, or to open a second instance of a program that is already running to get the icons and their associated functions back.
How would I go about writing a function for a program to capture an already running instance and restore the icon associated with it to the Tray without having to restart the computer? I'm sure that it can be done, as my AV program always restores itself after a restart of explorer.exe. But Trillian, Sonork, and the Client Manager for my wireless Internet link do not. I'd like to add that option to any programs I write but I havn't a clue how to approach the problem. How would you do it?
"Please don't put cigarette butts in the urinal. It makes them soggy and hard to light" - Sign in a Bullhead City, AZ Restroom
|
|
|
|
|
Roger Wright wrote:
to restart the PC
logoff too helps I guess
I was born intelligent Education ruined me!.
|
|
|
|
|
I had to check just now to see if that option exists in Win2K Server - I've never used it.
I'll give it a try next time I lose explorer.exe. Thanks for the suggestion!
"Please don't put cigarette butts in the urinal. It makes them soggy and hard to light" - Sign in a Bullhead City, AZ Restroom
|
|
|
|
|
If it is not a program that you have access to then your only option is to either restart the system or log off and back on. In W2k I can log off and back on and that works. Generally when you log off W2k will shut down any processes that you are running and then they will restart when you log back in.
If you write the program then there is a possible option. To add an icon to the system tray you use the Shell_NotifyIcon with the NIM_ADD parameter. I recall reading somewhere that you could register with the windows system to notify you when the shell was started. This is how programs that run before you log on are able to put an icon into the tray once you do log in. I can't seem to find the reference to it now. I think this is only available with the 5.x or higher version of the shell though.
I'll do some searching on MSDN for it. Maybe this message will ring a bell for someone else that has used it and they can pull it out of their hat quicker. I can't remember where I say it. My quick check of the shell functions didn't find anything. It may be a windows subsystem hook? Anyone?
|
|
|
|
|
Good info - Thanks! I'll do a hunt for the shell functions that relate to this. It would be nice to have anything I write that lives in the tray be self-healing when Windows breaks.
"Please don't put cigarette butts in the urinal. It makes them soggy and hard to light" - Sign in a Bullhead City, AZ Restroom
|
|
|
|
|
If you find something on this, will you be so kind as to write an article on it?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Sure!
Testing will be easy - all I have to do is try to open a computer in Network Neighborhood that I'm not allowed to access to crash Windows Explorer!
"Please don't put cigarette butts in the urinal. It makes them soggy and hard to light" - Sign in a Bullhead City, AZ Restroom
|
|
|
|
|
|
Great link - Thanks!
I don't think a requirement for IE4 is much of a problem anymore, though I do have huge problems with MS no longer offerring the full IE as a download. I'm seeing very few versions lower than 5.0 installed on users' PCs these days.
"Please don't put cigarette butts in the urinal. It makes them soggy and hard to light" - Sign in a Bullhead City, AZ Restroom
|
|
|
|
|
i have been looking for free software that will be able to transfer data in dos between pcs but those software all are shareware and have to buy in order to do the operation...is there any free software...or can just give me a list of shareware and freeware that will transfer data in dos between pcs using dos..?
thanks
|
|
|
|
|
I remember using Interlnk:
http://www.indiacam.net/pinout/interlinkdatatransfer.htm
jhaga
CodeProject House, Paul Watson wrote:
...and the roar of John Simmons own personal Nascar in the garage. Meg flitting about taking photos.Chris having an heated arguement with Colin Davies and .S.Rod. over egian values. Nish manically typing *censur*. Duncan racing around after his pet *c.* Michael Martin and Bryce loudly yelling *c.* C.G. having a fit as Roger Wright loads up *c.* . Anna waving her *c.* and Deb scoffing chocolates in the corner.
...Good heavens!
|
|
|
|
|
Anyone know how to set these from explorer as was the case with Win2K and NT4?
Can't seem to be able to select a group (such as Everyone) or individual users for files/folder permissions in XP. All I get with right click -> properties is the sharing tab. The help documetation says their should be a security tab - but its not there!!!!
Could do this fine under Win 2K - there for people to see. They seem to haev hidden it behind a wall of wizards.
Shameless Plug - Distributed Database Transactions in .NET using COM+
|
|
|
|
|
Look at Tools -> Folder Options -> View . The last option in the list is "Use simple file sharing (Recommended)". Untick this option, and you should get the permissions tab back.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
|
Is your hard-drive formatted as NTFS or FAT32? I believe the security options only show up on NTFS drives.
|
|
|
|
|
Hi All,
I'm looking to learn more about the Vantive 8.6 CRM application. I realize that PeopleSoft bought out Vantive back in '99, but my company received this tool via an acquisition and is possibly looking at integrating it into the operations side of the business.
If you could point me in the direction of some good, useful and detailed information I would appreciate it.
Or if you have some knowledge on this subject and would like to share it, that would also be appreciated.
Thanks for your help,
Nick
Nick
|
|
|
|
|
Any info on the above topic would be greatly appreciated..I'm in a real bind here.
Thanks for your time,
Nick
Nick
|
|
|
|
|
I have done some integration with Vantive in the past for a customer. We used DDE and some cutsom triggers in the database. I don't have full details of how the database side was implemented because the customer was required to do that.
I know that I basically passed some data to the application. The application used that data to execute a stored procedure in the database back end that would pull up a record. What kind of integration are you looking to do?
|
|
|
|
|
Hi Robert, thanks for the reply.
Actually, I was just looking for some general information concerning the Vantive CRM product from an end users prospective.
Basically, what the applications functionality are, what type industry is it geared towards, what can we do or not do with the application, how it compares to other CRM applications, if you recommend it or not, etc.
Since Vantive no longer exists on its own (as you know PeopleSoft bought it out and integrated Vantive’s technology into its own CRM application), its difficult to find basic "brochure like" info on Vantive 8.6 CRM
Thanks for the help!
Nick
|
|
|
|