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_killredir()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 LM_KILLREDIR()
 Cancel a redirection
------------------------------------------------------------------------------

 Syntax

      LM_KillRedir( <cLocalName> ) -> lSuccess

 Arguments

     <cLocalName> is a local printer port name (for example "LPT3:") or a
     drive letter (for example "X:") which is already is use to redirect
     a resource on the network.

 Returns

     <lSuccess> which is set to .T. if the operation succeeded and .F.
     if it did not succeed

 Description

     LM_KillRedir() is used to cancel redirection of a printer or disk
     drive which has previously been set up either with LM_Redirect(),
     with the "NET USE" command or in the Windows GUI. It works identically
     to the "NET USE" command with the "/D" option.

     LM_KillRedir() calls the DOS 3.1 networking function 5F04h to cancel
     the redirection. If the function call fails, the DOS error code can
     be retrieved by calling LM_Ferror().

     LM_KillRedir() 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 cLocalName := 'LPT3:'
     local lSuccess
     lSuccess := LM_KillRedir(cLocalName)
     if lSuccess
        ? 'The redirection of "' + cLocalName + '" was cancelled'
     else
        ? 'Could not cancel the redirection (Error ' +;
        ltrim(str(LM_Ferror())) + ')'
     endif

 Source: KILREDIR.PRG

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

See Also: LM_Redirect() LM_GetRedir()

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