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

 

Download Now!

See also:

Shut Down Expert


SDE Controller 1.04

Description
SDEController is a free Delphi & C++Builder component, designed for software developers, to integrate Shut Down Expert in their applications.
Use SDEController component to easily schedule Shut Down Expert events from your application.
SDEController Delphi & C++Builder component was created as an independent part of Shut Down Expert SDK, whose purpose is to help integrating Shut Down Expert in other applications.
Supported Operating Systems 
Windows 98/Me/NT/2000/XP/2003/Vista
IDE
Delphi 2007, Delphi 2006, Delphi 2005, Delphi 7, Delphi 6, Delphi 5, Delphi 4, C++Builder 2007, C++Builder 2006, C++Builder 6, C++Builder 5, Turbo Delphi, Turbo C++
Constants

Event constants
EV_Turn_Off = 'Turn Off';
EV_Turn_On = 'Turn On';
EV_Restart = 'Restart';
EV_Log_Off = 'Log Off';
EV_Lock_Computer = 'Lock Computer';
EV_Block_Input = 'Block Input';
EV_Unblock_Input = 'Unblock Input';
EV_Turn_Off_Monitor = 'Turn Off Monitor';
EV_Screen_Saver = 'Screen Saver';
EV_Standby = 'Standby';
EV_Hibernate = 'Hibernate';
EV_Wake_Up = 'Wake Up';
EV_Wake_On_LAN = 'Wake On LAN';
EV_Start_Application = 'Start_Application';
EV_Close_Application = 'Close Application';
EV_Defragmenter = 'Defragmenter';
EV_Empty_Recycle_Bin = 'Empty Recycle Bin';
EV_Empty_Clipboard = 'Empty Clipboard';
EV_Eject_CDROM = 'Eject CD-ROM';
EV_Close_CDROM = 'Close CD-ROM';
EV_Capture_Screen = 'Capture Screen';
EV_Message = 'Message';
EV_Beep = 'Beep';
EV_Sound = 'Sound';
EV_Sound_Off = 'Sound Off';
EV_Sound_On = 'Sound On';
EV_Send_Message = 'Send Message';
EV_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;

Day of week constants
DW_Monday = 1;
DW_Tuesday = 2;
DW_Wednesday = 3;
DW_Thursday = 4;
DW_Friday = 5;
DW_Saturday = 6;
DW_Sunday = 7;

IP_Local_Host = '';

WM_SDEEvent = WM_APP + 6777;

Types
SDEEventStruct = record
Event: ShortString; //type of the event
Param: ShortString; //parameter of the event
Time_Setting: Integer; //time setting option
Time: TDateTime; //schedule time
Date: TDateTime; //schedule date
DayOfWeek: Integer; //day of week in case of a weekly event
DayOfMonth: Integer; //day of month in case of monthly event
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 event.
Active: Boolean; //Status
end
PSDEEventStruct = ^SDEEventStruct
SDEIdleEventStruct = record
Event: ShortString;
Param: ShortString;
Minutes: Cardinal;
end
PSDEIdleEventStruct = ^SDEIdleEventStruct
SDEKeyboardEventStruct = record
EventName: ShortString;
ApplicationName: ShortString;
Key: ShortString;
end
PSDEKeyboardEventStruct = ^SDEKeyboardEventStruct
SDECustomEventStruct = record
EventName: ShortString;
DllName: ShortString;
MethodName: ShortString;
end
PSDECustomEventStruct = ^SDECustomEventStruct
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 InitSDEEventStruct(var evStruct: SDEEventStruct)
Description:
Initializes the event structure with default values. Use this method before fill a SDEEventStruct variable.
Parameters:
evStruct - event structure variable, containing the event related data.
Return value: -
Supported: - SDE 4.74 or later
function SetSDEEvent(evStruct: SDEEventStruct): Integer
Description:
Schedules a new event.
Parameters:
evStruct - event structure variable, containing the event related data.
Return value:
If the function succeed, returns a value greater than 0, which is the ID of the event, 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 (SDEEventStruct.Time_Setting).
-3 - Invalid event (SDEEventStruct.Event).
-4 - Parameter is missing (SDEEventStruct.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 RemoveSDEEvent(eventId: Integer): Integer
Description:
Removes an existing event specified by the ID of the event, returned by SetSDEEvent method.
Parameters:
eventId - ID of the event
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 PauseSDEEvent(eventId: Integer): Integer
Description:
Pauses an existing event specified by the ID of the event, returned by SetSDEEvent method. If the function succeed, returns 1.
Parameters:
eventId - ID of the event
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 ResumeSDEEvent(eventId: Integer): Integer
Description:
Resumes an existing event specified by the ID of the event, returned by SetSDEEvent method. If the function succeed, returns 1.
Parameters:
eventId - ID of the event .
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 InitSDEIdleEventStruct(var evStruct: SDEIdleEventStruct)
Description:
Initializes the idle event structure with default values. Use this method before fill a SDEIdleEventStruct variable.
Parameters:
evStruct - idle event structure variable, containing the event related data.
Return value: -
Supported: - SDE 4.75 or later
function SetSDEIdleEvent(evStruct: SDEIdleEventStruct): Integer
Description:
Sets a new idle event.
Parameters:
evStruct - idle event structure variable, containing the event 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 event (SDEIdleEventStruct.Event).
-4 - Parameter is missing (SDEIdleEventStruct.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 RemoveSDEIdleEvent(strEvent: String): Integer
Description:
Removes an idle event.
Parameters:
strEvent - Event 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 event (SDEIdleEventStruct.Event).
-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: String): 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 GetSDEEventList: TStringList
Description:
Returns a string list with the valid Shut Down Expert events.
Parameters: -
Return value: Shut Down Expert event list.
Supported: - SDE 4.74 or later
function GetSDEIdleEventList: TStringList
Description:
Returns a string list with the valid Shut Down Expert idle events.
Parameters: -
Return value: Shut Down Expert idle event list.
Supported: - SDE 4.74 or later
function IsValidEvent(strEvent: String): Boolean
Description:
Checks if an event is valid or not.
Parameters: -
strEvent - Shut Down Expert event name
Return value: True if the event is valid, otherwise false.
Supported: - SDE 4.74 or later
function IsValidIdleEvent(strEvent: String): Boolean
Description:
Checks if an idle event is valid or not.
Parameters: -
strEvent - Shut Down Expert idle event name
Return value: True if the idle event is valid, otherwise false.
Supported: - SDE 4.74 or later
function IsParamRequired(strEvent: String): Boolean
Description:
Checks if an event needs parameter or not.
Parameters: -
strEvent - Shut Down Expert event name
Return value: True if the event needs a parameter, otherwise false.
Supported: - SDE 4.74 or later
function RegisterCustomEvent(evStruct: SDECustomEventStruct): Integer
Description:
Registers a custom event.
Parameters: -
evStruct - custom event structure variable, containing the event 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 event with this name already exists.
-3 - Invalid name. A keyboard event with this name already exists.
-4 - Invalid name. Custom event already exists.
Supported: - SDE 4.78 or later

function UnregisterCustomEvent(strEvent: String): Integer

Description:
Unregisters a custom event.
Parameters: -
strEvent - custom event 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 event.

Supported: - SDE 4.78 or later

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