Unit:          NTNetWk.Pas
Contents:      TNTNetInfo VCL Component
Pallette Page: The Good Package

Author: Keith J. Rome
E-Mail: hightob@linknet.net
Web:    http://206.103.77.14/Delphi/

Description:

    TNTNetInfo is a simple non-visual component for use
in Delphi 2.0.  It is capable of reading the current
user's login name, and can read or set the computer's
network name.  All of these actions use the Win32 API,
and do not simply read the values from the registry or
.ini files.

usage:

    Very simple.  Just access the UserName (Read-Only) and
ComputerName (Read-Write) properties from within a 32-bit
Delphi application.  These properties are published, so they
will appear in the OI.  They return (or accept) simple Delphi
strings.  The component also supports various degrees of error
reporting via exceptions.

custom types:
    ENTNetError - custom exception used by TNTNetInfo
    TNTNetErrorReporting - enumerated type used by ErrorReporting
        property.  Possible values:
                niNone, niFatalErrorsOnly, niAllErrors
    TNTNetInfo - the component which is installed in the pallette

custom events:

    None.

custom methods:

    None.

custom properties:

    UserName - read-only.  Returns current user's name.
    ComputerName - read-write.  Returns or sets local computer's
        network name.
    ErrorReporting - read-write.  Returns or sets level of exception
        generation on errors.  Possible values:
                niNone - Never generate an exeption on error.
                niFatalErrorsOnly - Only generate exceptions when an
                        API function call fails.
                niAllErrors - Generate exceptions when any errors
                        occur (including user canceling the request).
    VerboseMode - read-write.  Turns verbose mode on or off.  When
        in verbose mode, confirmation dialog is displayed when an
        attempt to change the computer name is made.  When verbose
        mode is off, no confirmations are displayed.

NOTES:
    Setting the computer name:
        Attempting to set the computer name to more than 15 characters
    will cause TNTNetInfo to truncate the name first, to ensure the
    name is valid.  Any invalid characters will be translated by the
    API under 95, but will cause the name change to fail under NT.
        Turning off verbose mode will disable the confirmation dialog
    which asks the user to verify the change, and also disables the
    restart system dialog.  The actual restart is also never performed
    without confirmation.  Therefore, to disable the confirmations, and
    still automatically restart the system, you must issue an explicit
    ExitWindowsEx() call after changing the name.  This behavior is by
    design.


If you have questions or problems, please forward them to the address above.

enjoy,
Keith

