forked from project-jedi/jcl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSysInfo.dtx
3574 lines (3574 loc) · 115 KB
/
SysInfo.dtx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
@@JclSysInfo.pas
<GROUP SystemInformationRoutines>
Summary:
This unit contains routines and classes to retrieve various pieces of system information.
Examples are the location of standard folders, settings of environment variables,
processor details and the OS version.
--------------------------------------------------------------------------------
@@SystemInformationRoutines.CommonFolders
<GROUP SystemInformationRoutines>
<TITLE Common Folders>
<TOPICORDER 100>
--------------------------------------------------------------------------------
@@SystemInformationRoutines.Environment
<GROUP SystemInformationRoutines>
<TITLE Environment>
<TOPICORDER 200>
--------------------------------------------------------------------------------
@@SystemInformationRoutines.Hardware
<GROUP SystemInformationRoutines>
<TITLE Hardware>
<TOPICORDER 300>
--------------------------------------------------------------------------------
@@SystemInformationRoutines.Identification
<GROUP SystemInformationRoutines>
<TITLE Identification>
<TOPICORDER 400>
--------------------------------------------------------------------------------
@@SystemInformationRoutines.Keyboard
<GROUP SystemInformationRoutines>
<TITLE Keyboard>
<TOPICORDER 500>
--------------------------------------------------------------------------------
@@SystemInformationRoutines.Memory
<GROUP SystemInformationRoutines>
<TITLE Memory>
<TOPICORDER 600>
--------------------------------------------------------------------------------
@@SystemInformationRoutines.PowerManagement
<GROUP SystemInformationRoutines>
<TITLE Power Management>
<TOPICORDER 700>
--------------------------------------------------------------------------------
@@SystemInformationRoutines.ProcessesTasksandModules
<GROUP SystemInformationRoutines>
<TITLE Processes\, Tasks and Modules>
<TOPICORDER 800>
--------------------------------------------------------------------------------
@@SystemInformationRoutines.VersionInformation
<GROUP SystemInformationRoutines>
<TITLE Version Information>
<TOPICORDER 900>
--------------------------------------------------------------------------------
@@SystemInformationRoutines.UserAccountControl
<GROUP SystemInformationRoutines>
<TITLE User Account Control>
<TOPICORDER 1000>
--------------------------------------------------------------------------------
@@RunningProcessesList
<GROUP SystemInformationRoutines.ProcessesTasksandModules>
Summary:
Returns a list of all running processes.
Description:
RunningProcessesList fills the List parameter with a list of all running processes.
Parameters:
List - The list which is filled with the names of all running processes. Note that if this function is executed NT 3 or NT 4 the Objects property of the list contains INVALID_HANDLE_VALUE, on all other systems the Objects property is filled with the ToolHelp Process ID which you can use to further investigate the process.
FullPath - If True the names of processes in the list are expanded to include the full path of the executable file. If False only the process name (filename of the executable) is put in the list.
Result:
If the function succeeds it returns True, otherwise it returns False. In the latter
case the contents of the list is undefined.
Notes:
On Windows NT/2000 there exists two processes with PIDs 0 and 2 (8 on Windows 2000) which do not map to an executable image file. The names of these processes are fabricated by the routine as "System Idle Process" and "System Process" respectively.
Donators:
Petr Vones (Windows)
Robert Rossmair (Unix)
--------------------------------------------------------------------------------
@@LoadedModulesList
<GROUP SystemInformationRoutines.ProcessesTasksandModules>
Summary:
Returns the list of modules loaded by a process.
Description:
Returns a list of modules (dynamic link libraries) which are in use (loaded) by
the process specified by ProcessID.
Parameters:
List - List which receives the name of each loaded module. Each entry contains the full path to the modules image file.
ProcessID - Process ID of the process for which you want a list of loaded modules. To get the list of modules for the current process pass in the return value of the GetCurrentProcessID API function.
Result:
If the function it returns True, otherwise it returns False. In this latter case
the contents of the list are undefined.
Donator:
Petr Vones
--------------------------------------------------------------------------------
@@GetTasksList
<GROUP SystemInformationRoutines.ProcessesTasksandModules>
Summary:
Returns a list of running tasks.
Description:
Returns a list of running tasks. This is similar to the items visible on the
Applications tab of the Windows NT task manager. The routine uses a similar method
to discover all running tasks (described on http://msdn.microsoft.com/library/periodic/period97/win321197.htm)
but is not always accurate.
Parameters:
List - List which receives the running tasks.
Result:
If the function succeeds it returns True, otherwise it returns False. In this
latter case the contents of the list are undefined.
Donator:
Petr Vones
--------------------------------------------------------------------------------
@@IsWindowResponding
<GROUP SystemInformationRoutines.ProcessesTasksandModules>
Summary:
Determines whether a windows is responding to messages.
Description:
The IsWindowResponding function determines whether the window specified by the
Wnd parameter is still responding to messages. In effect this determines whether
the window "is hung" by the user perception. In reality the thread which "owns"
the window may not actually be hung but is too busy (in some kind of loop or by
a blocking wait operation) to receive messages.
Parameters:
Wnd - Handle to the window which you want to test.
Timeout - Timeout in milliseconds. The function send a bogus message to the window and then waits the specified time out value before returning. If the window responds to the message within the timeout value or Windows itself detects, by some other means, that the specified window is hung, the function may return earlier.
Result:
If the window is not responding the function returns False, otherwise it returns
True.
Donator:
Petr Vones
--------------------------------------------------------------------------------
@@GetWindowIcon
<GROUP SystemInformationRoutines.ProcessesTasksandModules>
Summary:
Returns the icon of a window.
Description:
Returns a handle to the icon of the specified window.
Parameters:
Wnd - Handle to the window for which to retrieve an icon.
LargeIcon - If True the function returns the large icon. If False the function returns the small icon. Note that the dimension of large and small can be retrieved by the GetSystemMetrics API function using the SM_C<X>ICON and SM_C<X>SMICON flags respectively (where <X> is either X or Y for the width and height respectively).
Result:
If the function succeeds it returns a handle to the requested icon, otherwise
it returns 0. In case of success you must release the handle by calling the
DestroyIcon API function.
Donator:
Petr Vones
--------------------------------------------------------------------------------
@@TerminateTask
<GROUP SystemInformationRoutines.ProcessesTasksandModules>
Summary:
Terminates the application which owns the specified window.
Description:
Terminates the application which owns the specified window. For further details
see the TerminateApp function/
Parameters:
Wnd - Handle to a top-level window owned by the application you wish to terminate.
Timeout - Timeout value, in milliseconds, indicating the time to wait between sending the WM_CLOSE message and forcefully terminating the application. You should set this timeout value to at least 5 seconds.
Result:
If the function succeeds to normally terminate the application (through the WM_CLOSE
message) it returns taClean. If the function had to terminate the application by
a call to TerminateProcess it returns taKill. If the function fails to terminate
the application it returns taError.
Donator:
Petr Vones
--------------------------------------------------------------------------------
@@TerminateApp
<GROUP SystemInformationRoutines.ProcessesTasksandModules>
Summary:
Terminates the application specified by ProcessID.
Description:
Terminates the application specified by ProcessID. The function first attempts
to terminate the application normally by sending it a WM_CLOSE message. If the
application doesn't terminate itself in response to that message and within the
specified timeout period, the function continues to forcefully terminate the
application using the TerminateProcess function. In this latter case the application
gets no change whatsoever to clean up it's resources and as such this may lead
to data loss. Be carefull and very sure there's no other way! The logic used
by this function is described in knowledge base article Q178893.
Parameters:
ProcessID - Process ID of the application to terminate.
Timeout - Timeout value, in milliseconds, indicating the time to wait between sending the WM_CLOSE message and forcefully terminating the application. You should set this timeout value to at least 5 seconds.
Result:
If the function succeeds to normally terminate the application (through the WM_CLOSE
message) it returns taClean. If the function had to terminate the application by
a call to TerminateProcess it returns taKill. If the function fails to terminate
the application it returns taError.
Donator:
Petr Vones
--------------------------------------------------------------------------------
@@GetProcessNameFromWnd
<GROUP SystemInformationRoutines.ProcessesTasksandModules>
Summary:
Returns the name of the process which owns a specific window.
Description:
GetProcessNameFrmWnd returns the name of the process which owns the window as
specified by the window's handle. Note that in order to find the process identifier
of the process that owns the specified window, you can use the GetWindowThreadProcessId
API function.
Parameters:
Wnd - Handle of the window for which to return the process name. This can be any type of window, including child windows such as buttons or edit boxes.
Result:
If the function succeeds it returns the name of the process that owns the windows,
if it fails the result is an empty string.
See also:
GetPidFromProcessName
GetProcessNameFromPid
Donator:
Petr Vones
--------------------------------------------------------------------------------
@@GetProcessNameFromPid
<GROUP SystemInformationRoutines.ProcessesTasksandModules>
Summary:
Returns the name of the process which is identified by PID.
Description:
GetProcessNameFromPid returns the name of the process specified by it's process
identifier (PID).
Parameters:
PID - Process identifier of the process whose name to retrieve.
Result:
If the function succeeds it returns the name of the process, if it fails it
returns an empty string.
See also:
GetProcessNameFromWnd
GetPidFromProcessName
Donator:
Marcel van Brakel
--------------------------------------------------------------------------------
@@GetShellProcessName
<GROUP SystemInformationRoutines.ProcessesTasksandModules>
Summary:
Returns the name of the shell process.
Description:
GetShellProcessName returns the name of the shell process as defined in the registry.
If the registry does not explicitly specify a shell process "explorer.exe" is returned
as a default.
Result:
The name of the shell process executable.
See also:
GetShellProcessHandle
Donator:
Marcel van Brakel
--------------------------------------------------------------------------------
@@GetShellProcessHandle
<GROUP SystemInformationRoutines.ProcessesTasksandModules>
Summary:
Returns a handle to the shell process.
Description:
GetShellProcessHandle returns a handle to the shell process, if any. The handle is
opened with full access (PROCESS_ALL_ACCESS) and must be closed by the caller using
the CloseHandle Windows API function.
Result:
If the function succeeds it returns a handle to the shell process. Upon failure the
function raises an exception (EOSError).
See also:
GetShellProcessName
Donator:
Marcel van Brakel
--------------------------------------------------------------------------------
@@GetPidFromProcessName
<GROUP SystemInformationRoutines.ProcessesTasksandModules>
Summary:
Returns the process identifier (PID) for the process identified by processname.
Description:
GetPidFromProcessName returns the process identifier (PID) of the process
identifier by ProcessName. The specified ProcessName must be the full name of
the process, that is including the extension, as it appears in task manager for
example.
Parameters:
ProcessName - Name of the process, including extension, of the process for which to retrieve the process identifier.
Result:
If the function succeeds it returns the process identifier of the specified
process. If the function fails it returns INVALID_HANDLE_VALUE. Most common
reason of failure is that the specified process doesn't exist (isn't running) or
you didn't specify the full name of the process.
See also:
GetProcessNameFromWnd
GetProcessNameFromPid
Donator:
Marcel van Brakel
--------------------------------------------------------------------------------
@@RoundToAllocGranularityPtr
<GROUP SystemInformationRoutines>
Summary:
Rounds an address to an allocation boundary.
Description:
Some Win32 API routines that take pointer parameters require that the specified
address is a multiple of the allocation granularity. On current Intel platforms
(x86) this is 64K. RoundToAllocGranularityPtr rounds the given 32 bit address
to a system defined allocation granularity boundary. You can have the function
round upwards or downwards by specifying True or False for the Up parameter
respectively. This function also exists for 64 bit pointers.
Parameters:
Value - The address to adjust.
Up - If True the function rounds the address up to the next multiple of the allocation granularity, if False it rounds the address down to the previous multiple of the allocation granularity.
Donator:
Wim De Cleen
--------------------------------------------------------------------------------
@@ProcessorCount
<GROUP SystemInformationRoutines.Hardware>
Summary:
Number of processors.
Description:
ProcessorCount contains the number of processors in the system. Initialized during
unit initialization.
Donator:
Marcel van Brakel
--------------------------------------------------------------------------------
@@AllocGranularity
<GROUP SystemInformationRoutines.Memory>
Summary:
Systems memory allocation granularity.
Description:
AllocGranularity contains the systems virtual memory allocation granularity.
Donator:
Marcel van Brakel
--------------------------------------------------------------------------------
@@PageSize
<GROUP SystemInformationRoutines.Memory>
Summary:
Holds the value of the system's virtual memory page size
Description:
Specifies the page size and the granularity of page protection and commitment.
This is the page size used by the VirtualAlloc function.
Platform:
Windows
--------------------------------------------------------------------------------
@@GetCommonAppdataFolder
<GROUP SystemInformationRoutines.CommonFolders>
Summary:
Returns the application data folder for all users.
Description:
GetCommonAppdataFolder returns the folder holding application data shared by
all users. A typical path is C:\Documents and Settings\All Users\Application Data.
Result:
The current directory for the calling process or an empty string on failure.
Notes:
Requires shell v5.00 and upwards.
See also:
GetCommonFilesFolder
GetCurrentFolder
GetProgramFilesFolder
GetWindowsFolder
GetWindowsSystemFolder
GetWindowsTempFolder
GetPersonalFolder
GetFavoritesFolder
GetStartupFolder
GetRecentFolder
GetSendToFolder
GetStartmenuFolder
GetDesktopDirectoryFolder
GetNethoodFolder
GetFontsFolder
GetCommonStartmenuFolder
GetCommonProgramsFolder
GetCommonStartupFolder
GetCommonDesktopdirectoryFolder
GetCommonAppdataFolder
GetAppdataFolder
GetPrinthoodFolder
GetCommonFavoritesFolder
GetTemplatesFolder
GetInternetCacheFolder
GetCookiesFolder
GetHistoryFolder
GetProgramsFolder
Donator:
Jean-Fabien Connault
--------------------------------------------------------------------------------
@@GetCurrentFolder
<GROUP SystemInformationRoutines.CommonFolders>
Summary:
Returns the current directory.
Description:
GetCurrentFolder returns the current directory (folder) for the calling process.
Result:
The current directory for the calling process or an empty string on failure.
Donators:
Robert Marquardt (Win32)
Robert Rossmair (Unix)
--------------------------------------------------------------------------------
@@DelEnvironmentVar
<GROUP SystemInformationRoutines.Environment>
Summary:
Deletes a environment variable.
Description:
DelEnvironmentVar deletes the environment variable specified by Name in the calling
process's environment block.
Parameters:
Name - Name of the environment variable to delete.
Result:
If the function succeeds it returns True, otherwise it returns False.
See also:
ExpandEnvironmentVar
GetEnvironmentVar
GetEnvironmentVars
SetEnvironmentVar
Donators:
Marcel van Brakel (Win32)
André Snepvangers (Unix)
--------------------------------------------------------------------------------
@@ExpandEnvironmentVar
<GROUP SystemInformationRoutines.Environment>
Summary:
Expands the environment variable.
Description:
ExpandEnvironmentVar expands an environment variable. If the variable contains
environment variable strings, for example %systemroot%, then these are replaced
by the system defined values for that specific variable. If the variable does
not exist it is left intact.
Parameters:
Value - On input the string which may contain environment variable strings that you want to expand. On exit a copy of the input with environment variables replaced by their system defined value, if they exist.
Result:
If the function succeeds it returns True, otherwise it returns False. In the latter
case the content of Value is undefined.
See also:
DelEnvironmentVar
GetEnvironmentVar
GetEnvironmentVars
SetEnvironmentVar
Donators:
Marcel van Brakel (Win32)
André Snepvangers (Unix)
--------------------------------------------------------------------------------
@@GetEnvironmentVar
<GROUP SystemInformationRoutines.Environment>
Summary:
Retrieves the value of an environment variable.
Description:
GetEnvironmentVar retrieves the value of the specified environment variable from
the process environment block. Depending on the value of the Expand parameter,
the returned string may contain environment variable strings such as %systemroot%.
To expand the string, thereby replacing the strings with their system defined
value, use ExpandEnvironmentVar.
Parameters:
Name - Name of the environment variable to retrieve.
Value - Receives the value of the specified environment variable, if it exists.
Expand - If True the returned value has the embedded environment strings expanded. If False these string are left unexpanded.
Result:
If the function succeeds it returns True, otherwise it returns False.
See also:
DelEnvironmentVar
ExpandEnvironmentVar
GetEnvironmentVars
SetEnvironmentVar
Donators:
Marcel van Brakel (Win32)
André Snepvangers (Unix)
--------------------------------------------------------------------------------
@@GetEnvironmentVars
<GROUP SystemInformationRoutines.Environment>
Summary:
Retrieves a list of all environment variables.
Description:
GetEnvironmentVars is similar to GetEnvironmentVar except that it
retrieves a list of environment variables in the process environment block and
their values. If Expand is set to True any embedded environment strings, such
as %systemroot% are replaced by their system defined value before exit.
Use of this function is not recommended by Microsoft. Instead you should
use GetEnvironmentVar to query the value of specific environment
variables.
Parameters:
Vars - Receives the list of environment variables and their values.
Expand - If True the individual items have the embedded environment strings expanded to their system defined value before exit. If False this expansion is not done.
Result:
If the function succeeds in retrieving the environment strings it returns True,
on failure it returns False. Note that a result of True does not necessarily mean
that environment string expansion was successful for all variables.
See also:
DelEnvironmentVar
ExpandEnvironmentVar
GetEnvironmentVar
SetEnvironmentVar
Donators:
Marcel van Brakel (Win32)
Robert Rossmair (Unix)
--------------------------------------------------------------------------------
@@SetEnvironmentVar
<GROUP SystemInformationRoutines.Environment>
Summary:
Sets the value of an environment variable.
Description:
SetEnvironmentVar sets the value of the specified environment variable to the
supplied value. If the variable does not exists it is created first.
Parameters:
Name - Name of the environment variable to set.
Value - New value for the specified environment variable.
Result:
If the function succeeds it returns True, otherwise it returns False.
See also:
DelEnvironmentVar
ExpandEnvironmentVar
GetEnvironmentVar
GetEnvironmentVars
Donators:
Marcel van Brakel (Win32)
André Snepvangers (Unix)
--------------------------------------------------------------------------------
@@TWindowsVersion
<GROUP SystemInformationRoutines.VersionInformation>
Summary:
Enumeration of Windows versions. Used as function result by GetWindowsVersion
Description:
Enumeration of Windows versions. Used as function result by GetWindowsVersion
See also:
GetWindowsVersion
Donator:
Marcel van Brakel
Jean-Fabien Connault
@@TWindowsVersion.wvUnknown
Anonymous Windows version. This can happen when a new Windows version is released
after JCL or if you are running a Windows version with a different build number
than expected. For example a beta version.
@@TWindowsVersion.wvWin95
Windows 95
@@TWindowsVersion.wvWin95OSR2
Windows 95 OSR 2 Windows 98
@@TWindowsVersion.wvWin98SE
Windows 98 Second Edition
@@TWindowsVersion.wvWinME
Windows Millenium
@@TWindowsVersion.wvWin2000
Windows 2000
@@TWindowsVersion.wvWinNT31
Windows NT 3.1
@@TWindowsVersion.wvWinNT35
Windows NT 3.5
@@TWindowsVersion.wvWinNT351
Windows NT 3.51
@@TWindowsVersion.wvWinNT4
Windows NT 4.0
@@TWindowsVersion.wvWin2000
Windows 2000
@@TWindowsVersion.wvWinXP
Windows XP
@@TWindowsVersion.wvWin2003
Windows Server 2003
@@TWindowsVersion.wvWin2003R2
Windows Server 2003 R2
@@TWindowsVersion.wvWinVista
Windows Vista
@@TWindowsVersion.wvWinServer2008
Windows Server 2008
@@TWindowsVersion.wvWin7
Windows 7
@@TWindowsVersion.wvWinServer2008R2
Windows Server 2008 R2
@@TWindowsVersion.wvWin8
Windows 8
@@TWindowsVersion.wvWin8RT
Windows RT
@@TWindowsVersion.wvWinServer2012
Windows Server 2012
@@TWindowsVersion.wvWin81
Windows 8.1
@@TWindowsVersion.wvWin81RT
Windows RT 8.1
@@TWindowsVersion.wvWinServer2012R2
Windows Server 2012 R2
--------------------------------------------------------------------------------
@@TWindowsEdition
<GROUP SystemInformationRoutines.VersionInformation>
Summary:
Enumeration of Windows editions. Used as function result by GetWindowsEdition
Description:
Enumeration of Windows editions. Used as function result by GetWindowsEdition
See also:
GetWindowsEdition
Donator:
Jean-Fabien Connault
@@TWindowsEdition.weUnknown
Anonymous Windows ediion. This can happen when a new Windows edition is released
after JCL or if you are running a Windows edition.
@@TWindowsEdition.weWinXPHome
Windows XP Home Edition
@@TWindowsEdition.weWinXPPro
Windows XP Professional
@@TWindowsEdition.weWinXPHomeN
Windows XP Home Edition N
@@TWindowsEdition.weWinXPProN
Windows XP Home Professional N
@@TWindowsEdition.weWinXPHomeK
Windows XP Home Edition K
@@TWindowsEdition.weWinXPProK
Windows XP Professional K
@@TWindowsEdition.weWinXPHomeKN
Windows XP Home Edition KN
@@TWindowsEdition.weWinXPProKN
Windows XP Professional KN
@@TWindowsEdition.weWinXPStarter
Windows XP Starter Edition
@@TWindowsEdition.weWinXPMediaCenter
Windows XP Media Center Edition
@@TWindowsEdition.weWinXPTablet
Windows XP Tablet PC Edition
@@TWindowsEdition.weWinVistaStarter
Windows Vista Starter
@@TWindowsEdition.weWinVistaHomeBasic
Windows Vista Home Basic
@@TWindowsEdition.weWinVistaHomeBasicN
Windows Vista Home Basic N
@@TWindowsEdition.weWinVistaHomePremium
Windows Vista Home Premium
@@TWindowsEdition.weWinVistaBusiness
Windows Vista Business
@@TWindowsEdition.weWinVistaBusinessN
Windows Vista Business N
@@TWindowsEdition.weWinVistaEnterprise
Windows Vista Enterprise
@@TWindowsEdition.weWinVistaUltimate
Windows Vista Ultimate
@@TWindowsEdition.weWin7Starter
Windows 7 Starter
@@TWindowsEdition.weWin7HomeBasic
Windows 7 Home Basic
@@TWindowsEdition.weWin7HomePremium
Windows 7 Home Premium
@@TWindowsEdition.weWin7Professional
Windows 7 Professional
@@TWindowsEdition.weWin7Enterprise
Windows 7 Enterprise
@@TWindowsEdition.weWin7Ultimate
Windows 7 Ultimate
@@TWindowsEdition.weWin8
Windows 8
@@TWindowsEdition.weWin8Professional
Windows 8 Professional
@@TWindowsEdition.weWin8Enterprise
Windows 8 Enterprise
@@TWindowsEdition.weWin8RT
Windows RT
@@TWindowsEdition.weWin81
Windows 8.1
@@TWindowsEdition.weWin81Professional
Windows 8.1 Professional
@@TWindowsEdition.weWin81Enterprise
Windows 8.1 Enterprise
@@TWindowsEdition.weWin81RT
Windows RT 8.1
--------------------------------------------------------------------------------
@@GetWindowsVersion
<GROUP SystemInformationRoutines.VersionInformation>
Summary:
Returns the Windows version.
Description:
GetWindowsVersion returns the Windows version as an enumerated type.
Result:
The Windows version, see TWindowsVersion for the possible values.
See also:
IsWin95
IsWin95OSR2
IsWin98
IsWin98SE
IsWinME
IsWinNT
IsWinNT3
IsWinNT31
IsWinNT35
IsWinNT351
IsWinNT4
IsWin2K
IsWinXP
IsWin2003
IsWin2003R2
IsWinVista
IsWinServer2008
IsWin7
IsWinServer2008R2
IsWin8
IsWinServer2012
IsWin81
IsWinServer2012R2
Donator:
Marcel van Brakel
Jean-Fabien Connault
--------------------------------------------------------------------------------
@@GetWindowsEdition
<GROUP SystemInformationRoutines.VersionInformation>
Summary:
Returns the Windows edition.
Description:
GetWindowsEdition returns the Windows edition as an enumerated type.
Result:
The Windows edition, see TWindowsEdition for the possible values.
Donator:
Jean-Fabien Connault
--------------------------------------------------------------------------------
@@GetOSVersionString
<GROUP SystemInformationRoutines.VersionInformation>
Summary:
Returns the operation system version as a string.
Description:
GetOSVersionString returns the operation system version and release/service
pack information as a string. For example, 'Linux 2.6.5' or 'Windows 2000 SP4'.
Result:
The operating sytem version and release/service pack information as a string,
or an empty string if the OS is not recognized.
See also:
GetWindowsVersionString
GetWindowsServicePackVersionString
Donator:
Robert Rossmair
--------------------------------------------------------------------------------
@@GetWindowsVersionString
<GROUP SystemInformationRoutines.VersionInformation>
Summary:
Returns the Windows version as a string.
Description:
GetWindowsVersionString returns the Windows version as a string. For example, 'Windows Vista'.
Notes:
The result does not contain the Windows edition string. For example, 'Ultimate'.
The Windows edition string is retrieved using the GetWindowsEditionString function.
To obtain the Windows product string (For Example 'Windows Vista Ultimate'), the
GetWindowsProductString function should be used.
Result:
The Windows version as a string or an empty string if the OS is not recognized.
See also:
GetWindowsVersion
GetWindowsEditionString
GetWindowsProductString
Donator:
Jean-Fabien Connault
--------------------------------------------------------------------------------
@@GetWindowsEditionString
<GROUP SystemInformationRoutines.VersionInformation>
Summary:
Returns the Windows edition as a string.
Description:
GetWindowsEditionString returns the Windows edition as a string. For example, 'Ultimate'.
Notes:
The result does not contain the Windows version string. For example, 'Windows Vista'.
The Windows version string is retrieved using the GetWindowsVersionString function.
To obtain the Windows product string (For Example 'Windows Vista Ultimate'), the
GetWindowsProductString function should be used.
Result:
The Windows edition as a string or an empty string if the edition is not recognized.
See also:
GetWindowsEdition
GetWindowsVersionString
GetWindowsProductString
Donator:
Jean-Fabien Connault
--------------------------------------------------------------------------------
@@GetWindowsProductString
<GROUP SystemInformationRoutines.VersionInformation>
Summary:
Returns the Windows product as a string.
Description:
GetWindowsProductString returns the Windows product as a string. For example, 'Windows Vista Ultimate'.
The Windows product string is equivalent to the concatenation of the Windows version string
and the Windows edition string.
Notes:
The Windows version string alone is retrieved using the GetWindowsVersionString function. For example, 'Windows Vista'.
The Windows edition string alone is retrieved using the GetWindowsEditionString function. For example, 'Ultimate'.
Result:
The Windows product as a string or an empty string if the product is not recognized.
See also:
GetWindowsEditionString
GetWindowsVersionString
Donator:
Jean-Fabien Connault
--------------------------------------------------------------------------------
@@GetWindowsBuildNumber
<GROUP SystemInformationRoutines.VersionInformation>
Summary:
Returns the Windows build number.
Description:
Returns the Windows build number.
Result:
The Windows build number.
Donator:
Jean-Fabien Connault
--------------------------------------------------------------------------------
@@GetWindowsServicePackVersion
<GROUP SystemInformationRoutines.VersionInformation>
Summary:
Returns the installed service pack.
Description:
Returns the major version number of the latest installed Windows Service Pack.
Result:
The major version number of the latest installed Service Pack. In case of failure, or it
no Service Pack is installed, the function returns 0.
See also:
GetWindowsVersion
GetWindowsServicePackVersionString
Donator:
Jean-Fabien Connault
--------------------------------------------------------------------------------
@@GetWindowsServicePackVersionString
<GROUP SystemInformationRoutines.VersionInformation>
Summary:
Returns the installed service pack as a string.
Description:
Returns the major version number of the latest installed Windows Service Pack as a string.
Result:
The major version number of the latest installed Service Pack. In case of failure, or if
no Service Pack is installed, the function returns an empty string.
See also:
GetWindowsServicePackVersion
GetWindowsVersionString
Donator:
Jean-Fabien Connault
--------------------------------------------------------------------------------
@@TestFDIVInstruction
<GROUP SystemInformationRoutines.Hardware>
Summary:
Tests the processor for the flawed FDIV instruction.
Description:
TestFDIVInstruction tests the processor for the correctness of the FDIV instruction.
Older pentium processors had a bug in this instruction that caused incorrect
results under specific circumstances. Modern processors do not exhibit this bug.
Result:
If the FDIV instruction is OK the function returns True, if it is flawed the
function returns False.
See also:
GetCpuInfo
TCpuInfo
TestFDIVInstruction
GetCpuSpeed
Donator:
Bryan Coutch
--------------------------------------------------------------------------------
@@CPUID
<GROUP SystemInformationRoutines.Hardware>
Summary:
Returns information about the processor.
Description:
CPUID is used by GetCpuInfo for obtaining information about the processor.
You can call this function directly but it is recommend you use GetCpuInfo
instead. If you do call CPUID then keep in mind that the ISFDIVOK, FrequencyInfo
and MMX fields of the returned TCpuInfo record contain undefined data.
Result:
CPUID returns information about the processor through a TCpuInfo record.
See also:
GetCpuInfo
TCpuInfo
TestFDIVInstruction
GetCpuSpeed
Donator:
Bryan Coutch
--------------------------------------------------------------------------------
@@GetCpuSpeed
<GROUP SystemInformationRoutines.Hardware>
Summary:
Returns information about the processor speed.
Description:
GetCpuSpeed calculates the speed (frequency) of a processor. It returns the
information in a TFreqInfo record which includes the actual calculated
speed as well as a normalized speed.
Parameters:
CpuSpeed - Receives the CPU speed. See the description of TFreqInfo for more information about the members of this record.
Result:
If the function succeeds it returns True, otherwise it returns False. In the latter
case the content of the CpuSpeed parameter is undefined.
See also:
GetCpuInfo
TFreqInfo
Donator:
Bryan Coutch
--------------------------------------------------------------------------------
@@RoundFrequency
<GROUP SystemInformationRoutines.Hardware>
Summary:
Normalizes a frequency.
Description:
RoundFrequency rounds a frequency as obtained from GetCpuSpeed to a
normalized frequency. For example, if GetCpuSpeed returns a calculated frequency
of 266.13 MHz then RoundFrequency will return the normalized 266 MHz.
Parameters:
Frequency - The frequency to round (normalize) in MHz.
Result:
The normalized frequency in MHz.
Donator:
Bryan Coutch
--------------------------------------------------------------------------------
@@GetMacAddresses
<GROUP SystemInformationRoutines.Hardware>
Summary:
Retrieves the MAC addresses for a computer.
Description:
GetMacAddresses returns a list of all MAC addresses for the specified computer.
The computer can be the local computer or a computer on the network.
Parameters:
Machine - Netbios name of the computer who's MAC addresses you want. This can be the 'standard' computer name of a computer on the network or a '*' for the local computer (you can also use the local computer name or an empty string).
Addresses - On output a list of all MAC address found.
Result:
The function returns the number of MAC addresses that are available for the
specified computer. The Addresses list may contain fewer addresses though. The
function attempts to get all the addresses but might fail for some of them, in
which case it continues to retrieve the remaining addresses. In case of complete
failure the function returns -1 and the Addresses list will be empty.
Notes:
This function is an adapted conversion from the Platform SDK example described in knowledge base article Q118623.
Donator:
Marcel van Brakel
--------------------------------------------------------------------------------
@@ReadTimeStampCounter
<GROUP SystemInformationRoutines.Hardware>
Summary:
Reads the time stamp counter.
Description:
The ReadTimeStampCounter function reads and returns the current value of the time stamp counter.
The time-stamp counter counts CPU clocks from the time the processor is reset,
where it is initialized to an unknown count. This is a 64 bit count and therefore
it can accumulate counts for almost 2500 years (based on a 200MHz processor)
before a rollover occurs. You may want to consider inlining this instruction as
opposed to calling this function. If you do, the resulting 64 bit integer
containing the count is returned in the combination EDX:EAX.
Result:
The current value of the time stamp counter.
Notes:
This instruction is only available on Pentium (and higher) processors.
Donator:
Azret Botash
--------------------------------------------------------------------------------
@@GetVolumeSerialNumber
<GROUP SystemInformationRoutines.Identification>
Summary:
Returns the volume serial number for the specified drive.
Description:
GetVolumeSerialNumber returns the serial number for the specified volume. You
may specify a volume (e.g. 'c:\') or a UNC name.
Parameters:
Drive - The volume for which to retrieve the serial number. You must specify the root-directory of a drive (e.g. 'c:\') or a full UNC name in which case you must follow it with an additional backslash.
Result:
If the function succeeds it returns the serial number of the specified volume.
If the function fails it returns an empty string.
Donator:
John C Molyneux
--------------------------------------------------------------------------------
@@GetVolumeFileSystem
<GROUP SystemInformationRoutines.Identification>
Summary:
Returns the name of the filesystem of the specified volume.
Description:
GetVolumeFileSystem returns the name of the filesystem of the specified volume.
This can be a string such as 'FAT' or 'NTFS'. You may specify a volume (e.g. 'c:\')
or a UNC name.
Parameters:
Drive - The volume for which to filesystem name. You must specify the root-directory of a drive (e.g. 'c:\') or a full UNC name in which case you must follow it with an additional backslash.
Result:
If the function succeeds it returns the name of the filesystem of the specified
volume. If the function fails it returns an empty string.
Donator:
John C Molyneux
--------------------------------------------------------------------------------
@@GetVolumeName
<GROUP SystemInformationRoutines.Identification>
Summary:
Returns the name for the specified drive.
Description:
GetVolumeName returns the name of the specified volume. You
may specify a volume (e.g. 'c:\') or a UNC name.
Parameters:
Drive - The volume for which to retrieve the name. You must specify the root-directory of a drive (e.g. 'c:\') or a full UNC name in which case you must follow it with an additional backslash.
Result:
If the function succeeds it returns the name of the specified volume.
If the function fails it returns an empty string.
Donator:
John C Molyneux
--------------------------------------------------------------------------------
@@GetIPAddress
<GROUP SystemInformationRoutines.Identification>
Summary:
Returns the IP address of a host.
Description:
GetIPAddress attempts to resolve a hostname to an IP address. If the function
succeeds it returns the IP address in dotted decimal notation. You can call
GetIPAddress with GetLocalComputerName or an empty string as the HostName
parameter to get the IP address of the local computer. This function assumes
IPv4 addresses and only returns one IP address, even if the specified host has
more then one.
Parameters:
HostName - The name of the host computer who's IP address you want. If an empty string is passed the function returns the IP address of the local computer.
Result:
If the function succeeds it returns the IP address of the specified host in the
dotted decimal notation. If the function fails it returns an empty string.
Donator:
John C Molyneux
--------------------------------------------------------------------------------
@@TIntelSpecific
<GROUP SystemInformationRoutines.Hardware>
Summary:
Describes the cache of an Intel processor.
Description:
Describes the cache of an Intel processor.
Donator:
Bryan Coutch
@@TIntelSpecific.L2Cache
Size of the level 2 cache in Kb.
@@TIntelSpecific.CacheDescriptors
Detailed information about the data and instruction caches. You can map these entries to a descriptive string by using the IntelCacheDescription global variable. The entry in that array for which the D member matches the value in the CacheDescriptors array is the entry who's I member contains the descriptive string. You can use the IntelCacheDescription function to get that string.
--------------------------------------------------------------------------------
@@TCyrixSpecific
<GROUP SystemInformationRoutines.Hardware>
Summary:
Describes the cache of a Cyrix processor.
Description:
Describes the cache of a Cyrix processor.
Donator:
Bryan Coutch
@@TCyrixSpecific.L1CacheInfo
Describes the level 1 cache. If an entry contains the value $80 it denotes a '16KB L1 Cache, 4-way set associative, 16 byte line size' cache.
@@TCyrixSpecific.TLBInfo