Share via


ExtExtension.GetArgStr method

The GetArgStr method returns a named string argument from the command line used to invoke the current extension command.

Syntax

PCSTR GetArgStr(
  [in] PCSTR Name,
  [in] bool  Required
);

Parameters

  • Name [in]
    Specifies the name of the argument. The command-line description used in EXT_COMMAND must specify that the type of this argument is string.

  • Required [in]
    Specifies if the argument is required. If Required is true and the argument was not present on the command line, ExtInvalidArgumentException is thrown. You do not need to set this parameter; if it is not set Required defaults to true.

Return value

GetArgStr returns the named string argument.

Remarks

For an overview of argument parsing in the EngExtCpp extensions framework, see Parsing Extension Arguments.

The string returned by GetArgStr is only meaningful during the execution of the current extension command.

This method should only be called during the execution of an extension command provided by this class.

Requirements

Target platform

Desktop

Header

Engextcpp.hpp (include Engextcpp.hpp)

See also

ExtExtension

EXT_COMMAND

 

 

Send comments about this topic to Microsoft