Command Property

The command to be sent to the remote host.

Syntax

ANSI (Cross Platform)
char* GetCommand();
int SetCommand(const char* lpszCommand); Unicode (Windows) LPWSTR GetCommand();
INT SetCommand(LPCWSTR lpszCommand);
@property (nonatomic,readwrite,assign,getter=command,setter=setCommand:) NSString* command;
- (NSString*)command;
- (void)setCommand:(NSString*)newCommand;
#define PID_REXEC_COMMAND 2

IPWORKS_EXTERNAL void* IPWORKS_CALL IPWorks_Rexec_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
IPWORKS_EXTERNAL int IPWORKS_CALL IPWorks_Rexec_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);

Default Value

""

Remarks

Assigning a UNIX command to this property makes the class attempt to connect to the RemoteHost and execute the command using the rexec protocol. There is no need to append an end-of-line character to the command.

If "" (empty string) is assigned to the Command property, the current connection is broken.

Example (Execute a Command)


RexecControl.Command = "cd /home/username/; ls -al; cd/; ls"

Data Type

String

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 C++ Edition - Version 20.0 [Build 8161]