Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- LanMan Library Reference Guide - <b>lm_getcompname()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 LM_GETCOMPNAME()
 Get the local computer name
------------------------------------------------------------------------------

 Syntax

      LM_GetCompName() -> cComputerName

 Arguments

     NONE

 Returns

     <cComputerName> which is the NETBIOS name of the local computer

 Description

     LM_GetCompName() retrieves the NETBIOS name of the computer on
     which the application is running.

     LM_GetCompName() calls the DOS 3.1 networking function 5E00h to
     find the computer name. If the function call fails, an empty string
     will be returned instead of the computer name. The DOS error code
     can then be retrieved by calling LM_Ferror().

     LM_GetCompName() requires FT_Int86() and supporting functions from
     the Nanforum Toolkit and its companion CPMI library. It is supposed
     to work on any computer running DOS 3.1 or higher.

 Examples

     local cCompName
     cCompName := LM_GetCompName()
     if !empty(cCompName)
        ? 'The local computer name is ' + cCompName
     else
        ? 'Could not get the computer name (Error ' +;
        ltrim(str(LM_Ferror())) + ')'
     endif

 Source: GETCNAME.PRG

 Author: Klas Engwall <klas.engwall@engwall.com>

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson