Re: How to get Computer Name given IP address?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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
>>
>>
>
>


.



Relevant Pages

  • Re: Security Update for PPV Does Not Install (KB956500)
    ... Bad news...I didn't get past step 1 on Jack Lu's solution. ... Was able to successfully Rename the Windows Update SoftwareDistribution ... Again, to get your error code number, open MS Update page. ... a new window pops up with your error code. ...
    (microsoft.public.powerpoint)
  • Re: How to get Computer Name given IP address?
    ... you don't necessarily have to provide "dialog" window handle. ... >> LPSHFILEOPSTRUCT fileop; ... >>> RussR, ... >>> Wierd error code. ...
    (microsoft.public.windowsxp.embedded)
  • Re: CreateDevice() returns D3DERR_INVALIDCALL
    ... it always fails with the error code ... dialog window isn't Direct3D, just one control. ... /// Our rendering device ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Problem with windows components
    ... The error code on Defender is code 0x80080005 ... The error in window setup is Setup library wbemupgd.dll could not be ... When I register the dll's I always get an error on ...
    (microsoft.public.windowsupdate)
  • Re: 0x8024502D error code.
    ... I would appreciate if any body help me to fixed my computer. ... When i try to update the window i get the error code 0x8024502D, ... > If the problem persists then we need to take a look at the WindowsUpdate.log ...
    (microsoft.public.windowsupdate)