Re: How to get Computer Name given IP address?
- From: "KM" <konstmor@xxxxxxxxxxxxxxxx>
- Date: Wed, 17 Aug 2005 14:17:47 -0700
Replied you in another (original) thread.
Btw, you don't necessarily have to provide "dialog" window handle. It could be any window owner handle that can be a parent to the
shell progress dialog box.
--
Regards,
KM
> Ok, I've got another question for you regarding LPSHFILEOPSTRUCT.
> here's what I have:
> LPSHFILEOPSTRUCT fileop;
> fileop->hwnd= NULL;
> fileop->wFunc=FO_MOVE;
> fileop->pFrom=copyPath.c_str();
> fileop->pTo="c:\\Data";
> fileop->fFlags=FOF_SILENT | FOF_NOCONFIRMMKDIR | FOF_NOCONFIRMATION;
>
> I'm experiencing a problem in that hwnd is a pointer to a dialog window and I don't know what to give it since my code is in a
> command line app. Any ideas?
>
> Thanks,
> RussR
>
> "KM" <konstmor@xxxxxxxxxxxxxxxx> wrote in message news:ud5%23OCqoFHA.1044@xxxxxxxxxxxxxxxxxxxxxxx
>> RussR,
>>
>>> nslookup doesn't work
>>
>> What problems were there?
>> Did you monitor the tool with Filemon/Regmon?
>>
>>> gethostbyaddr() looked like exactly what i wanted, but i couldn't get it work. it always returned null and the error that it
>>> returned to WSAGetLastError() was = 1 which was not defined in the docuemntation.
>>
>> Wierd error code (all WSA error codes should be with 10000 basis).
>> Did you call WSAStartup first?
>> I assume the "Windows Sockets" and "TCP/IP Networking" components are in your image with all dependencies resolved.
>> Also, make sure "Primitive: Iphlpapi" and "Windows Firewall/Internet Connection Sharing (ICS)" included.
>>
>> You will also need toturn off firewall on the image (at least for testing purposes).
>>
>> --
>> Regards,
>> KM
>>
>>
>>> "KM" <konstmor@xxxxxxxxxxxxxxxx> wrote in message news:%23agEz3poFHA.3084@xxxxxxxxxxxxxxxxxxxxxxx
>>>> RussR,
>>>>
>>>> You basically need to do reverse lookup for component names.
>>>> Have you tried nslookup.exe tool? ("Command Line DNS Query Utility" component).
>>>>
>>>> gethostbyaddr API is what you probably looking for if you need NetBIOS names. Search MSDN for more info on the function.
>>>>
>>>> --
>>>> Regards,
>>>> KM
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm writing a program on my xpe computer that is running on a network and it has to "discover"
>>>>> the names of the other computers on the network in that same workgroup. The
>>>>> good thing is that it knows all the IP addresses of the computers on the
>>>>> network for which it wants the names. Is there a function that will allow
>>>>> me to do this?
>>>>>
>>>>> I'm aware of this:
>>>>> BOOL GetComputerName(
>>>>> LPTSTR lpBuffer, // address of name buffer
>>>>> LPDWORD nSize // address of size of name buffer
>>>>> );
>>>>>
>>>>> It is however only useful on the computer where my code runs, not for
>>>>> getting the names of the others.
>>>>>
>>>>> The network is a regular Client For MS Networks with Workgroup (No Domain)
>>>>> running. The systems will all be headless.
>>>>>
>>>>> Thanks,
>>>>> RussR
>>
>>
>
>
.
- Follow-Ups:
- Re: How to get Computer Name given IP address?
- From: RussR
- Re: How to get Computer Name given IP address?
- References:
- How to get Computer Name given IP address?
- From: RussR
- Re: How to get Computer Name given IP address?
- From: KM
- Re: How to get Computer Name given IP address?
- From: RussR
- Re: How to get Computer Name given IP address?
- From: KM
- Re: How to get Computer Name given IP address?
- From: RussR
- How to get Computer Name given IP address?
- Prev by Date: Re: Moving Files over the network through a program
- Next by Date: Re: System License Violation - Part II
- Previous by thread: Re: How to get Computer Name given IP address?
- Next by thread: Re: How to get Computer Name given IP address?
- Index(es):
Relevant Pages
|