Navigation:  Examples >

NetName() - Get the computer NETBIOS name

Previous pageReturn to chapter overviewNext page

Package Url:

http://news.xbwin.com/ot4xb.examples/1/

 

 

 

#include "ot4xb.ch"

// ------------------------------------------------------------------------

function Main()

   ? cPrintf( "Computer Name : [%s]", cGetComputerName() )

   inkey(0)

return NIL

 

// ------------------------------------------------------------------------

function cGetComputerName() // ... NetName() like the CAToolsIII

   local cn := ChrR(0,256)

   local cb := 255

   @kernel32:GetComputerNameA(@cn,@cb)

return TrimZ(cn)