Allows you to execute a token command.
WORD Execute(ANSISTRING CMD; ANSISTRING RetString;)
Token command string to send to GroupWise (example ’AboutDlg()’)
Empty string if token doesn't have a return value. Return string if token has a return value and execution succeeds. Error string if token execution fails.
WORD. 0 if token execution fails. 1 if token execution succeeds.
To get the currently logged in user ID, use the EnvUserID() token. The Pascal code to send this token is:
vCommander:=CreateOleObject('GroupWiseCommander');
Retval:=vCommander.Execute('EnvUserID',ReturnString)
ReturnString = the logged in GroupWise UserID string.
Retval = 1 for success
When calling the token commander execute method from .NET, you need to initialize the “RetString” output parameter with the correct type or you get a “Type Mismatch” exception from the .NET runtime. For example:
// Invalid: Produces "Type Mismatch"
string strResult;
commander.Execute("AboutDlg()", out strResult);
// Valid
string strResult = "";
commander.Execute("AboutDlg()", out strResult);
// Invalid: Produces "Type Mismatch"
Dim strResult As String
commander.Execute("AboutDlg()", strResult)
// Valid
Dim strResult As String
strResult = ""
commander.Execute("AboutDlg()", strResult)