BOOL IsCommandEnabled( |
|
LPCTSTR lpszCommand |
|
); |
Determine if a specific server command has been enabled or
disabled.
Parameters
- lpszCommand
- A pointer to a NULL terminated string that specifies the name of
the command. The command name is not case-sensitive, but the value
must otherwise match the exact command name. Partial matches are not
recognized by this method. This parameter cannot be NULL.
Return Value
If the command is enabled, this method will return a non-zero
value. If the command is disabled or the command name does not match
a supported command, this method will return zero.
Remarks
The IsCommandEnabled method is used to determine
whether a specific command is enabled. Typically this method is used
in an event handler to make sure the command issued by a
client is recognized by the server and enabled for use. Commands can
be enabled using the EnableCommand method and disabled using
the DisableCommand method.
This method does not account for the permissions granted to a
specific client session. Clients are assigned access rights when they
are authenticated using the AuthenticateClient method,
and certain commands can be limited by the permissions granted to the
client. For example, even though the STOR command is enabled, a client
must have the FTP_ACCESS_WRITE permission to use the command to
upload a file to the server. For a list of access rights, see
User Access Constants.
Requirements
Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csftsv10.lib
Unicode: Implemented as Unicode and ANSI versions.
See Also
AuthenticateClient,
DisableCommand,
EnableCommand,
GetCommandName
|