Home | Company | Products | Partners | Link to us | Forum | Contact | Search

Zyl Soft

 

Shut Down Expert

Download Now!

See also:

Shut Down Expert


SDE Controller 1.08

Description
SDEController is a free Delphi & C++Builder component, designed for software developers, to integrate Shut Down Expert functionalities in their applications.
Use SDEController component to easily schedule Shut Down Expert tasks from your application.
Supported Operating Systems 
Windows 98/Me/NT/2000/XP/Server2003/Vista/Server2008/7/8/Server2012/10
IDE
Delphi 10.x, Delphi XE-XE8, Delphi 2010, Delphi 2009, Delphi 2007, Delphi 2006, Delphi 2005, Delphi 7, Delphi 6, Delphi 5, Delphi 4, C++Builder XE, C++Builder 2010, C++Builder 2009, C++Builder 2007, C++Builder 2006, C++Builder 6, Turbo Delphi, Turbo C++
Constants

//Task constants
TSK_Turn_Off = 'Turn Off';
TSK_Turn_On = 'Turn On';
TSK_Restart = 'Restart';
TSK_Log_Off = 'Log Off';
TSK_Lock_Computer = 'Lock Computer';
TSK_Block_Input = 'Block Input';
TSK_Unblock_Input = 'Unblock Input';
TSK_Turn_Off_Monitor = 'Turn Off Monitor';
TSK_Screen_Saver = 'Screen Saver';
TSK_Standby = 'Standby';
TSK_Hibernate = 'Hibernate';
TSK_Wake_Up = 'Wake Up';
TSK_Wake_On_LAN = 'Wake On LAN';
TSK_Start_Application = 'Start_Application';
TSK_Close_Application = 'Close Application';
TSK_Defragmenter = 'Defragmenter';
TSK_Empty_Recycle_Bin = 'Empty Recycle Bin';
TSK_Empty_Clipboard = 'Empty Clipboard';
TSK_Eject_CDROM = 'Eject CD-ROM';
TSK_Close_CDROM = 'Close CD-ROM';
TSK_Capture_Screen = 'Capture Screen';
TSK_Message = 'Message';
TSK_Beep = 'Beep';
TSK_Sound = 'Sound';
TSK_Sound_Off = 'Sound Off';
TSK_Sound_On = 'Sound On';
TSK_Send_Message = 'Send Message';
TSK_Download = 'Download';

//Time Setting constants
TS_At = 0;
TS_From_In = 1;
TS_In = 2;
TS_Now = 3;
TS_Hourly = 4;
TS_Daily = 5;
TS_Business_Days = 6;
TS_Weekend_Days = 7;
TS_Weekly = 8;
TS_Monthly = 9;
TS_Yearly = 10; //SDE 5.11 or later

//Day of week constants
DW_Monday = 1;
DW_Tuesday = 2;
DW_Wednesday = 4;
DW_Thursday = 8;
DW_Friday = 16;
DW_Saturday = 32;
DW_Sunday = 64;
DW_EveryDay = 128;

IP_Local_Host = '';

WM_SDETask = WM_APP + 6777;

Types
SDETaskStruct = record
Task: ShortString; //type of the task
Param: ShortString; //parameter of the task
Time_Setting: Integer; //time setting option
Time: TDateTime; //schedule time
Date: TDateTime; //schedule date
DayOfWeek: Integer; //day of week in case of a weekly task
DayOfMonth: Integer; //day of month in case of monthly task
In_Hours: Integer; //number of hours
In_Minutes: Integer; //number of minutes
In_Seconds: Integer; number of seconds
Period: Integer; //not used
Remote_IP: ShortString; //IP of target machine. Use IP_Local_Host if you want a local task.
Active: Boolean; //Status
end
PSDETaskStruct = ^SDETaskStruct
SDEIdleTaskStruct = record
Task: ShortString;
Param: ShortString;
Minutes: Cardinal;
end
PSDEIdleTaskStruct = ^SDEIdleTaskStruct
SDEKeyboardTaskStruct = record
TaskName: ShortString;
ApplicationName: ShortString;
Key: ShortString;
end
PSDEKeyboardTaskStruct = ^SDEKeyboardTaskStruct
SDECustomTaskStruct = record
TaskName: ShortString;
DllName: ShortString;
MethodName: ShortString;
end
PSDECustomTaskStruct = ^SDECustomTaskStruct
Methods
 
constructor Create(AOwner: TComponent)
Description:
Constructor.
Parameters:
AOwner - owner of the component.
Return value: -
Supported: - SDE 4.74 or later
destructor Destroy()
Description:
Destructor.
Parameters: -
Return value: -
Supported: - SDE 4.74 or later
procedure InitSDETaskStruct(var evStruct: SDETaskStruct)
Description:
Initializes the task structure with default values. Use this method before fill a SDETaskStruct variable.
Parameters:
evStruct - task structure variable, containing the task related data.
Return value: -
Supported: - SDE 4.74 or later
function SetSDETask(evStruct: SDETaskStruct): Integer
Description:
Schedules a new task.
Parameters:
evStruct - task structure variable, containing the task related data.
Return value:
If the function succeed, returns a value greater than 0, which is the ID of the task, otherwise it returns an error code less or equal to 0:
0 - Unkown error.
-1 - Shut Down Expert is not running.
-2 - Invalid time setting parameter (SDETaskStruct.Time_Setting).
-3 - Invalid task (SDETaskStruct.Task).
-4 - Parameter is missing (SDETaskStruct.Param).
-5 - Feature is not available.
-6 - Feature available only on NT operating systems.
-7 - Invalid download directory.
-8 - Wrong password. Unlock Shut Down Expert using Unlock method.
-9 - Set in the past.
-10 - No rights on remote computer.
-11 - Trial version expired.
-12 - The current windows account has no administrator rights.

Supported: - SDE 4.74 or later

function RemoveSDETask(taskId: Integer): Integer
Description:
Removes an existing task specified by the ID of the task, returned by SetSDETask method.
Parameters:
taskId - ID of the task
Return value: If the function succeed, returns 1, otherwise it returns an error code less or equal to 0:
0 - Unkown error.
-1 - Shut Down Expert is not running.
Supported: - SDE 4.74 or later
function PauseSDETask(taskId: Integer): Integer
Description:
Pauses an existing task specified by the ID of the task, returned by SetSDETask method. If the function succeed, returns 1.
Parameters:
taskId - ID of the task
Return value: If the function succeed, returns 1, otherwise it returns an error code less or equal to 0:
0 - Unkown error.
-1 - Shut Down Expert is not running.
Supported: - SDE 4.74 or later
function ResumeSDETask(taskId: Integer): Integer
Description:
Resumes an existing task specified by the ID of the task, returned by SetSDETask method. If the function succeed, returns 1.
Parameters:
taskId - ID of the task .
Return value:
If the function succeed, returns 1, otherwise it returns an error code less or equal to 0:
0 - Unkown error.
-1 - Shut Down Expert is not running.
Supported: - SDE 4.74 or later
procedure InitSDEIdleTaskStruct(var evStruct: SDEIdleTaskStruct)
Description:
Initializes the idle task structure with default values. Use this method before fill a SDEIdleTaskStruct variable.
Parameters:
evStruct - idle task structure variable, containing the task related data.
Return value: -
Supported: - SDE 4.75 or later
function SetSDEIdleTask(evStruct: SDEIdleTaskStruct): Integer
Description:
Sets a new idle task.
Parameters:
evStruct - idle task structure variable, containing the task related data.
Return value:
If the function succeed, returns 1, otherwise it returns an error code less or equal to 0:
0 - Unkown error.
-1 - Shut Down Expert is not running.
-3 - Invalid task (SDEIdleTaskStruct.Task).
-4 - Parameter is missing (SDEIdleTaskStruct.Param).
-6 - Feature available only on NT operating systems.
-7 - Invalid download directory.
-8 - Wrong password. Unlock Shut Down Expert using Unlock method.
-11 - Trial version expired.
-12 - The current windows account has no administrator rights.
Supported: - SDE 4.75 or later
function RemoveSDEIdleTask(strTask: AnsiString): Integer
Description:
Removes an idle task.
Parameters:
strTask - Task which will be removed.
Return value:
If the function succeed, returns 1, otherwise it returns an error code less or equal to 0:
0 - Unkown error.
-1 - Shut Down Expert is not running.
-3 - Invalid task (SDEIdleTaskStruct.Task).
-8 - Wrong password. Unlock Shut Down Expert using Unlock method.
-11 - Trial version expired.
-12 - The current windows account has no administrator rights.
Supported: - SDE 4.75 or later
function Unlock(strPassword: AnsiString): Integer
Description:
Unlocks Shut Down Expert.
Parameters:
strPassword - Shut Down Expert password.
Return value: If the function succeed, returns 1, otherwise it returns an error code less or equal to 0:
0 - Unkown error.
-1 - Shut Down Expert is not running.
-2 - Invalid password.
-3 - No password.
Supported: - SDE 4.74 or later
function Lock: Integer
Description:
Locks Shut Down Expert.
Parameters: -
Return value: If the function succeed, returns 1, otherwise it returns an error code less or equal to 0:
0 - Unkown error.
-1 - Shut Down Expert is not running.
-3 - No password.
Supported: - SDE 4.74 or later
function RunSDE: Integer
Description:
Runs Shut Down Expert.
Parameters: -
Return value: If the function succeed, returns 1, otherwise it returns an error code less or equal to 0:
0 - Unkown error.
-1 - File not found (ShutDown.exe).
Supported: - SDE 4.74 or later
function IsSDERunning: Boolean
Description:
Checks if Shut Down Expert is running.
Parameters: -
Return value: If Shut Down Expert is running returns true, otherwise false.
Supported: - SDE 4.74 or later
function GetSDETaskList: TStringList
Description:
Returns a string list with the valid Shut Down Expert tasks.
Parameters: -
Return value: Shut Down Expert task list.
Supported: - SDE 4.74 or later
function GetSDEIdleTaskList: TStringList
Description:
Returns a string list with the valid Shut Down Expert idle tasks.
Parameters: -
Return value: Shut Down Expert idle task list.
Supported: - SDE 4.74 or later
function IsValidTask(strTask: AnsiString): Boolean
Description:
Checks if a task is valid or not.
Parameters: -
strTask - Shut Down Expert task name
Return value: True if the task is valid, otherwise false.
Supported: - SDE 4.74 or later
function IsValidIdleTask(strTask: AnsiString): Boolean
Description:
Checks if an idle task is valid or not.
Parameters: -
strTask - Shut Down Expert idle task name
Return value: True if the idle task is valid, otherwise false.
Supported: - SDE 4.74 or later
function IsParamRequired(strTask: AnsiString): Boolean
Description:
Checks if a task needs parameter or not.
Parameters: -
strTask - Shut Down Expert task name
Return value: True if the task needs a parameter, otherwise false.
Supported: - SDE 4.74 or later
function RegisterCustomTask(evStruct: SDECustomTaskStruct): Integer
Description:
Registers a custom task.
Parameters: -
evStruct - custom task structure variable, containing the task related data.
Return value: If the function succeed, returns 1, otherwise it returns an error code less or equal to 0:
0 - Unkown error.
-1 - Shut Down Expert is not running.
-2 - Invalid name. A standard task with this name already exists.
-3 - Invalid name. A keyboard task with this name already exists.
-4 - Invalid name. Custom task already exists.
Supported: - SDE 4.78 or later

function UnregisterCustomTask(strTask: AnsiString): Integer

Description:
Unregisters a custom task.
Parameters: -
strTask - custom task name
Return value: If the function succeed, returns 1, otherwise it returns an error code less or equal to 0:
0 - Unkown error.
-1 - Shut Down Expert is not running.
-2 - Unexisting custom task.

Supported: - SDE 4.78 or later


Copyright © 2003 - 2019 by Zyl Soft.
All rights reserved.