FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour DNS
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
DNS
Posted: Thu Mar 28, 2024 12:00 PM

Hi,

DNS is registered on the computer. Is it possible to read their values from FWH ?

Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: DNS
Posted: Thu Mar 28, 2024 01:31 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: DNS
Posted: Thu Mar 28, 2024 09:05 PM
Code (fw): Select all Collapse
   WSAStartup()
   ? GETHOSTNAME()   // Name of your PC
   ? GETHOSTBYNAME( GETHOSTNAME() ) // Your IP address on your local network
   WsaCleanUp()
Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: DNS
Posted: Fri Mar 29, 2024 07:49 AM
Thank you, Rao! What does the WSACleanup() function do ?
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: DNS
Posted: Fri Mar 29, 2024 07:53 AM

WSACleanup() is responsible for performing cleanup tasks when your program is finished using Winsock functionality.

Unloads Winsock DLLs: When called, WSACleanup() typically unloads any protocol-specific helper DLLs (Dynamic Link Libraries) that were loaded during the initialization process using WSAStartup(). These DLLs provide support for specific network protocols like TCP/IP.

Cancels Pending Calls (with caution): It's important to note that WSACleanup() cancels any pending blocking or asynchronous Winsock calls issued by any thread in your application. This cancellation happens without notification messages or event object signaling, which could potentially lead to unexpected behavior if not handled carefully.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: DNS
Posted: Fri Mar 29, 2024 08:26 AM

Thanks, I get it !

Continue the discussion