COM API for calling some of Kernel32 functions.
| Kernel - COM API for calling some of Kernel32 functions. | |||||||
| Process - Process object. Timing informations, priority settings and Ids. (CurrentProcess property, Current process.) | |||||||
| Thread - Thread object. Timing informations, priority settings and Ids. (PrimaryThread property, Primary thread of the process.) | |||||||
| Thread - Thread object. Timing informations, priority settings and Ids. (CurrentThread property, Current thread) | |||||||
| Process - Process object. Timing informations, priority settings and Ids. (Process property, The process of the thread.) | |||||||
| CloseHandle | Closes an open object handle. | |
| CopyFile | The CopyFile method copies an existing file to a new file. | |
| CreateProcess | Creates a new process and its primary thread. The new process executes the specified executable file. | |
| DeleteFile | The DeleteFile method deletes an existing file. | |
| GetFileSize | The GetFileSize function retrieves the size, in bytes, of the specified file. | |
| MoveFile | The MoveFile method renames/moves an existing file or a directory (including all its children). | |
| Sleep | Suspends the execution of the current thread for a specified interval. | |
| SwitchToThread | Causes the calling thread to yield execution to another thread that is ready to run on the current processor. The operating system selects the thread to yield to. | |
| WaitForSingleObject | returns when one of the following occurs: The specified object is in the signaled state . The time-out interval elapses. |
| CurrentDirectory | Retrieves or sets the current directory for the current process. |
| String, RW | |
| CommandLine | The command-line string for the current process. |
| String, RO | |
| ComputerName | Retrieves the computer name of the current systιm. |
| String, RO | |
| CurrentProcess | Current process. |
| Process, RO | |
| CurrentThread | Current thread |
| Thread, RO | |
| EnvironmentStrings | The environment block for the current process. |
| String, RO | |
| EnvironmentVariables | Retrieves the value of the specified variable from the environment block of the calling process. |
| String, RO | |
| hrCounter | Retrieves the current value of the high-resolution performance counter, if one exists. |
| double, RO | |
| hrFrequency | Retrieves the frequency of the high-resolution performance counter, if one exists. |
| double, RO | |
| hrTimeCounter | Retrieves the current value of the high-resolution performance counter, if one exists. The value of counter is converted to time (divided by hrFrequency). |
| double, RO | |
| TempPath | Retrieves the path of the directory designated for temporary files. |
| String, RO | |
| TickCount | The number of milliseconds that have elapsed since Windows was started. |
| Long, RO |
ASP timing |
<Script RunAt=Server Language=VBScript>
Set Kernel = CreateObject("ScriptUtils.Kernel")'Creates the Kernel object
'Get start times
TickCount = Kernel.TickCount
KernelTime = Kernel.CurrentThread.KernelTime
UserTime = Kernel.CurrentThread.UserTime
'
..
'Some script commands
'
..
For i=1 To 100000
j = i
Next
'Write times
Response.Write "<br>Script time : " & (Kernel.TickCount - TickCount) & " ms"
Response.Write "<br>Kernel time : " & CLng((Kernel.CurrentThread.KernelTime - KernelTime)*86400000) & " ms"
Response.Write "<br>UserTime time : " & CLng((Kernel.CurrentThread.UserTime - UserTime)*86400000) & " ms"
Kernel = Empty
</Script> |
Write system variables. |
<%
Set Kernel = CreateObject("ScriptUtils.Kernel")'Creates the Kernel object
Response.Write "<PRE>"
Response.Write "<br>ComputerName :" & Kernel.ComputerName
Response.Write "<br>CommandLine :" & Kernel.CommandLine
Response.Write "<br>CurrentDirectory :" & Kernel.CurrentDirectory
Response.Write "<br>TempPath :" & Kernel.TempPath
Response.Write "<br>EnvironmentStrings :" & Kernel.EnvironmentStrings
Response.Write "<br>Process.KernelTime :" & Kernel.CurrentProcess.KernelTime
Response.Write "<br>Process.UserTime :" & Kernel.CurrentProcess.UserTime
Response.Write "<br>Thread.KernelTime :" & Kernel.CurrentThread.KernelTime
Response.Write "<br>Thread.UserTime :" & Kernel.CurrentThread.UserTime
Dim I
For I=1 To 10
Response.Write "<br>TickCount :" & Kernel.TickCount
Kernel.Sleep 500
Next
Response.Write "</PRE>"
%> |
Timing informations. |
<Script RunAt=Server Language=VBScript>
Set Kernel = CreateObject("ScriptUtils.Kernel")'Creates the Kernel object
'Get start times
TickCount = Kernel.TickCount
KernelTime = Kernel.CurrentThread.KernelTime
UserTime = Kernel.CurrentThread.UserTime
'
..
'Some script commands
'
..
For i=1 To 100000
j = i
Next
'Write times
Response.Write "<br>Script time : " & (Kernel.TickCount - TickCount) & " ms"
Response.Write "<br>Kernel time : " & CLng((Kernel.CurrentThread.KernelTime - KernelTime)*86400000) & " ms"
Response.Write "<br>UserTime time : " & CLng((Kernel.CurrentThread.UserTime - UserTime)*86400000) & " ms"
Kernel = Empty
</Script> |
Kernel, ByteArray, Process, Thread, Advapi, INIFile, ZLib, LogFile, ASPForm, FormFields, FormField, FormParser, ProgressInfo
ProcessCreationFlags, ThreadPriorities, PriorityClasses, LogonTypes, ConvertCodePages, OutputTypes, ZLibCompressLevels, ConvertTypes, LogLineEncodes, LogLineBeginTypes, FormStates, eFormType
Huge ASP upload is easy to use, hi-performance ASP file upload component with progress bar indicator. This component lets you upload multiple files with size up to 4GB to a disk or a database along with another form fields. Huge ASP file upload is a most featured upload component on a market with competitive price and a great performance . The software has also a free version of asp upload with progress, called Pure asp upload , written in plain VBS, without components (so you do not need to install anything on server). This installation package contains also ScriptUtilities library. Script Utilities lets you create hi-performance log files , works with binary data , you can download multiple files with zip/arj compression, work with INI files and much more with the ASP utility.
© 1996 - 2011 Antonin Foller, Motobit Software | About, Contacts | e-mail: info@pstruh.cz