What is skfuncs.dll?
skfuncs.dll is a little component with a bunch of functions we missed within Omnis or found them to complicated to create etc. So we implementend those functions in this DLL.
This means, that skfuncs.dll might be updated frequently. If you like, just stop by once in a while and check, if there are new functions implemented.
Or if you have an idea for a usefull new funtion the Omnis community might need. Just write an E-Mail and we'll think about it (no guarantee given).
Functions
All functions of skfuncs.dll can be found in the group of external command within the Omnis command list. We know, this is not the latest thechnology using OOP etc. but so these function are accessible to Omnis Classic developers, too.
1. Sleep
Sometimes Omnis has to wait a certain amount of time i.e. for an external process to complete. Doing this by using a loop construct in Omnis always ends up in Omnis consuming 100% processor power which is tolerable on a desktop application but not in a server application.
The Sleep command lets Omnis "sleep" for a certain amount of time which can be given in seconds or milliseconds without generating any processor utilization.
Syntax: Sleep iTime, iUseSeconds
iTime is a long Integer value giving the amount of time to sleep.
iUseSeconds is a small integer or boolean value, determining if iTime is given in Seconds (1)
or milliseconds (0).
2. DecToHex
Converts a given integer value into a hexadecimal number.
Syntax: DecToHex (i_iDecVal,l_cHexStr) Returns lRet
i_iDecVal: Long integer, value to be converted to hex
l_cHexStr: Character, return value in hexadecimal characters
lRet: Return value, ktrue if function successful, otherwise zero.
3. HexToDec
Converts a given hexadecimal value into an integer.
Syntax: HexToDec (i_HexVal) Returns lRet
i_HexVal: Character, hex value to be converted to integer
lRet: Return integer value if function successful, otherwise zero.
4. GetProcessList
Returns a list of all processes running under Windows with their process name and process IDs.
Though Omnis has a Register DLL/Call DLL command, this API function is more or less impossible to call from Omnis, because its one of the C-centric API-funtions with has a callback interface and returns a C-specific data structure.
Syntax: GetProcessList (iProcList) Returns lRet
iProcList: An Omnis list which has to be defined before calling the function:
lRet: Short integer, kTrue is the function succeeds, kFalse if not.
Do iProcList.$define(lProcNum,lProcName)
lProcNum: Long integer
lProcname: Character [100]
4. GetServiceList
Returns a list of all services running under Windows NT/XP/2000/2003 with their service name and service state.
Syntax: GetProcessList (iServiceList) Returns lRet
iServiceList: An Omnis list which has to be defined before calling the function:
lRet: Short integer, kTrue is the function succeeds, kFalse if not.
Do iServiceList.$define(lServiceName,lServiceState)
lServiceName: Character [100]
lServiceState: Long integer
The list column lServiceState may have the following values (like defined in the MS Platform SDK):
- 1 SERVICE STOPPED
- 2 SERVICE_START_PENDING
- 3 SERVICE_STOP_PENDING
- 4 SERVICE_RUNNING
- 5 SERVICE_CONTINUE_PENDING
- 6 SERVICE_PAUSE_PENDING
- 7 SERVICE_PAUSED
Installation
Copy skfuncs.dll into the EXTERNAL folder within the Omnis application folder.
|