Click here to Skip to main content
15,888,610 members
Articles / Programming Languages / VBScript

ProSysLib: Dissecting the Process

Rate me:
Please Sign up or sign in to vote.
4.84/5 (69 votes)
22 Nov 2010CPOL12 min read 128.5K   2.6K   174  
Access detailed information about the current process the easiest way.
// ProSysLib.idl : IDL source for ProSysLib
//

#include "GUIDs.h"
import "oaidl.idl";
import "ocidl.idl";

[v1_enum]
[helpstring("Configures user account parameters for enumerators/collections.")]
enum PSLEnumUserType
{
	[helpstring("Enumerate only objects associated with the current user account.")]
	enumForCurrentUser = 1,

	[helpstring("Enumerate all objects, i.e. associated with any user account.")]
	enumForAllUsers = 2
};

[v1_enum]
[helpstring("Operational System Version.")]
enum PSLOSMainVersion
{
	[helpstring("The OS version is newer than any of the known versions, or failed to recognize the version.")]
	osvUnknown = 0,

	[helpstring("Windows 2000 Operational System.")]
	osvWindows2000 = 2,

	[helpstring("Windows XP Operational System.")]
	osvWindowsXP = 3,

	[helpstring("Windows 2003 Operational System.")]
	osvWindows2003 = 4,

	[helpstring("Windows Vista Operational System.")]
	osvWindowsVista = 5,

	[helpstring("Windows 2008 Operational System.")]
	osvWindows2008 = 6,

	[helpstring("Windows 7 Operational System.")]
	osvWindows7 = 7,

	[helpstring("Windows 8 Operational System.")]
	osvWindows8 = 8
};

[v1_enum]
[helpstring("OS Suit Mask that identifies the product suites available on the system.")]
enum PSLOSSuitMask
{
	[helpstring("Microsoft Small Business Server was once installed on the system, but may have been upgraded to another version of Windows.")]
	smSmallBusiness = 0x01,

	[helpstring("Windows Server 2008 Enterprise, Windows Server 2003, Enterprise Edition, Windows 2000 Advanced Server, or Windows NT Server 4.0 Enterprise Edition is installed.")]
	smEnterprise = 0x02,

	[helpstring("Microsoft BackOffice components are installed.")]
	smBackOffice = 0x04,

	[helpstring("Terminal Services is installed. This value is always set. If smTerminal is set but smSingleUserTS is not set, the system is running in application server mode.")]
	smTerminal = 0x10,

	[helpstring("Microsoft Small Business Server is installed with the restrictive client license in force.")]
	smSmallBusinessRestricted = 0x20,

	[helpstring("Windows XP Embedded is installed.")]
	smEmbeddedNT = 0x40,

	[helpstring("Windows Server 2008 Datacenter, Windows Server 2003, Datacenter Edition or Windows 2000 Datacenter Server is installed.")]
	smDataCenter = 0x80,

	[helpstring("Remote Desktop is supported, but only one interactive session is supported. This value is set unless the system is running in application server mode.")]
	smSingleUserTS = 0x100,

	[helpstring("Windows Vista Home Premium, Windows Vista Home Basic, or Windows XP Home Edition is installed.")]
	smPersonal = 0x200,

	[helpstring("Windows Server 2003, Web Edition is installed.")]
	smBlade = 0x400,

	[helpstring("Windows Storage Server 2003 R2 or Windows Storage Server 2003 is installed.")]
	smStorageServer = 0x2000,

	[helpstring("Windows Server 2003, Compute Cluster Edition is installed.")]
	smComputeServer = 0x4000,

	[helpstring("Windows Home Server is installed.")]
	smHomeServer = 0x8000
};

[v1_enum]
[helpstring("Type of special folder in the system.")]
enum PSLSpecialFolder
{
	[helpstring("The virtual folder that represents the Windows desktop, the root of the namespace.")]
	sfDesktop = 0,

	[helpstring("A virtual folder for Internet Explorer.")]
	sfInternet = 1,

	[helpstring("The file system directory that contains the user's program groups (which are themselves file system directories).")]
	sfPrograms = 2,

	[helpstring("The virtual folder that contains icons for the Control Panel applications.")]
	sfControls = 3,

	[helpstring("The virtual folder that contains installed printers.")]
	sfPrinters = 4,

	[helpstring("The virtual folder that represents the My Documents desktop item.")]
	sfMyDocuments = 5,

	[helpstring("The file system directory that serves as a common repository for the user's favorite items.")]
	sfFavourites = 6,

	[helpstring("The file system directory that corresponds to the user's Startup program group. The system starts these programs whenever any user logs onto or starts Windows.")]
	sfStartup = 7,

	[helpstring("The file system directory that contains shortcuts to the user's most recently used documents.")]
	sfRecent = 8,

	[helpstring("The file system directory that contains Send To menu items.")]
	sfSendTo = 9,

	[helpstring("The virtual folder that contains the objects in the user's Recycle Bin.")]
	sfBitBucket = 10,

	[helpstring("The file system directory that contains Start menu items.")]
	sfStartMenu = 11,

	[helpstring("The file system directory that serves as a common repository for music files.")]
	sfMyMusic = 13,

	[helpstring("The file system directory that serves as a common repository for video files.")]
	sfMyVideo = 14,

	[helpstring("The file system directory used to physically store file objects on the desktop (not to be confused with the desktop folder itself).")]
	sfDesktopDirectory = 16,

	[helpstring("The virtual folder that represents My Computer, containing everything on the local computer: storage devices, printers, and Control Panel. The folder can also contain mapped network drives.")]
	sfDrives = 17,

	[helpstring("A virtual folder that represents Network Neighborhood, the root of the network namespace hierarchy.")]
	sfNetwork = 18,

	[helpstring("A file system directory that contains the link objects that may exist in the My Network Places virtual folder. It is not the same as sfNetwork, which represents the network namespace root.")]
	sfNethood = 19,

	[helpstring("A virtual folder that contains fonts.")]
	sfFonts = 20,

	[helpstring("The file system directory that serves as a common repository for document templates.")]
	sfTemplates = 21,

	[helpstring("The file system directory that contains the programs and folders that appear on the Start menu for all users.")]
	sfCommonStartMenu = 22,

	[helpstring("The file system directory that contains the directories for the common program groups that appear on the Start menu for all users.")]
	sfCommonPrograms = 23,

	[helpstring("The file system directory that contains the programs that appear in the Startup folder for all users.")]
	sfCommonStartup = 24,

	[helpstring("The file system directory that contains files and folders that appear on the desktop for all users.")]
	sfCommonDesktopDirectory = 25,

	[helpstring("The file system directory that serves as a common repository for application-specific data.")]
	sfAppData = 26,

	[helpstring("The file system directory that contains the link objects that can exist in the Printers virtual folder.")]
	sfPrinthood = 27,

	[helpstring("The file system directory that serves as a data repository for local (nonroaming) applications.")]
	sfLocalAppdata = 28,

	[helpstring("The file system directory that corresponds to the user's nonlocalized Startup program group.")]
	sfAltStartup = 29,

	[helpstring("The file system directory that corresponds to the nonlocalized Startup program group for all users.")]
	sfCommonAltStartup = 30,

	[helpstring("The file system directory that serves as a common repository for favorite items common to all users.")]
	sfCommonFavorites = 31,

	[helpstring("The file system directory that serves as a common repository for temporary Internet files.")]
	sfInternetCache = 32,

	[helpstring("The file system directory that serves as a common repository for Internet cookies.")]
	sfCookies = 33,

	[helpstring("The file system directory that serves as a common repository for Internet history items.")]
	sfHistory = 34,

	[helpstring("The file system directory that contains application data for all users.")]
	sfCommonAppData = 35,

	[helpstring("The Windows directory or SYSROOT.")]
	sfWindows = 36,

	[helpstring("The Windows System folder.")]
	sfSystem = 37,

	[helpstring("The Program Files folder.")]
	sfProgramFiles = 38,

	[helpstring("The file system directory that serves as a common repository for image files.")]
	sfMyPictures = 39,

	[helpstring("The user's profile folder.")]
	sfProfile = 40,

	[helpstring("The Windows System folder for WoW64 applications.")]
	sfSystemX86 = 41,

	[helpstring("The Program Files folder for WoW64 applications.")]
	sfProgramFilesX86 = 42,

	[helpstring("A folder for components that are shared across applications.")]
	sfProgramFilesCommon = 43,

	[helpstring("A folder for components that are shared across applications for WoW64 applications.")]
	sfProgramFilesCommonX86 = 44,

	[helpstring("The file system directory that contains the templates that are available to all users.")]
	sfCommonTemplates = 45,

	[helpstring("The file system directory that contains documents that are common to all users.")]
	sfCommonDocuments = 46,

	[helpstring("The file system directory that contains administrative tools for all users of the computer.")]
	sfCommonAdminTools = 47,

	[helpstring("The file system directory that is used to store administrative tools for an individual user. The Microsoft Management Console (MMC) will save customized consoles to this directory, and it will roam with the user.")]
	sfAdminTools = 48,

	[helpstring("The virtual folder that represents Network Connections, that contains network and dial-up connections.")]
	sfConnections = 49,

	[helpstring("The file system directory that serves as a repository for music files common to all users.")]
	sfCommonMusic = 53,

	[helpstring("The file system directory that serves as a repository for image files common to all users.")]
	sfCommonPictures = 54,

	[helpstring("The file system directory that serves as a repository for video files common to all users.")]
	sfCommonVideo = 55,

	[helpstring("The file system directory that contains resource data.")]
	sfResources = 56,

	[helpstring("The file system directory that contains localized resource data.")]
	sfResourcesLocalized = 57,

	[helpstring("Folder that contains links created by OEM companies.")]
	sfCommonOEMLinks = 58,

	[helpstring("The file system directory that acts as a staging area for files waiting to be written to a CD")]
	sfCDBurnArea = 59,

	[helpstring("The folder that represents other computers in your workgroup.")]
	sfComputersNearMe = 61
};

[v1_enum]
[helpstring("Exceptions that can be generated by ProSysLib.")]
enum PSLException
{
	[helpstring("Invalid or not recognized exception code. Only possible when method DecodeException is called with invalid parameter.")]
	exInvalid = -1,

	[helpstring("No exception. This signals a successful operation.")]
	exNone = 0,

	[helpstring("Unknown/Generic error occured within the component.")]
	exGeneric = 1,

	[helpstring("Trying to access a collection element with index outside the range of array bounds.")]
	exIndexOutOfRange = 2,

	[helpstring("Method or Property not implemented in the current version of ProSysLib.")]
	exNotImplemented = 3,

	[helpstring("Failed to allocate memory during operation.")]
	exLowMemory = 4,

	[helpstring("Operation failed because of insufficient access rights or privileges.")]
	exAccessDenied = 5,

	[helpstring("Value for method parameter or property wasn�t recognized as valid.")]
	exInvalidParameter = 6,

	[helpstring("Windows Management Interface generated an error. Property LastError in WMI namespace contains the error code.")]
	exWMIError = 7
};

[v1_enum]
[helpstring("Process Priority")]
enum PSLProcessPriority
{
	[helpstring("Priority either unknown or not applicable, like for System Idle process.")]
	ppUnknown = 0,

	[helpstring("Normal Priority")]
	ppNormal = 0x00000020,

	[helpstring("Real-Time Priority")]
	ppRealTime = 0x00000100,

	[helpstring("Low/Idle Priority")]
	ppLow = 0x00000040,

	[helpstring("High Priority")]
	ppHigh = 0x00000080,

	[helpstring("Below Normal Priority")]
	ppBelowNormal = 0x00004000,

	[helpstring("Above Normal Priority")]
	ppAboveNormal = 0x00008000
};

[v1_enum]
[helpstring("Thread Priority")]
enum PSLThreadPriority
{
	[helpstring("Priority is unknown.")]
	tpUnknown = 0,

	[helpstring("Normal priority for the priority class.")]
	tpNormal = 1,

	[helpstring("Priority Idle.")]
	tpIdle = 2,

	[helpstring("Priority 2 points above the priority class.")]
	tpHighest = 3,

	[helpstring("Priority 1 point below the priority class.")]
	tpBelowNormal = 4,

	[helpstring("Priority 1 point above the priority class.")]
	tpAboveNormal = 5,

	[helpstring("Priority 2 points below the priority class.")]
	tpLowest = 6,

	[helpstring("Time-Critical Priority.")]
	tpTimeCritical = 7
};

[v1_enum]
[helpstring("Type of Named Object that can be used for retrieving its Access Mask via method Security->GetNamedObjectAccess.")]
enum PSLNamedType
{
	[helpstring("Object name is either file path or folder.")]
	ntFileOrFolder = 1, // SE_FILE_OBJECT

	[helpstring("Object name is one of services registered in the system.")]
	ntService = 2, // SE_SERVICE

	[helpstring("Object name is one of printers registered in the system.")]
	ntPrinter = 3, // SE_PRINTER

	[helpstring("Object name is a valid registry key path.")]
	ntRegKey = 4, // SE_REGISTRY_KEY

	[helpstring("Object name is one of a shared folder.")]
	ntNetworkShare = 5 // SE_LMSHARE
};

[v1_enum]
[helpstring("Used in the security functions and interfaces to specify an impersonation level, which indicates the amount of authority given to the server when it is impersonating the client.")]
enum PSLImpersonationLevel
{
	[helpstring("Tells DCOM to choose the impersonation level by using its normal security blanket negotiation algorithm.")]
	impDefault = 0, // RPC_C_IMP_LEVEL_DEFAULT

	[helpstring("The server process can impersonate the client, but the impersonation token will not contain any information and cannot be used for anything.")]
	impAnonymous = 1, // RPC_C_IMP_LEVEL_ANONYMOUS

	[helpstring("The server can obtain the client's identity. The server can impersonate the client for ACL checking, but it cannot access system objects as the client.")]
	impIdentity = 2, // RPC_C_IMP_LEVEL_IDENTIFY

	[helpstring("The server process can impersonate the client's security context while acting on behalf of the client. This level of impersonation can be used to access local resources such as files.")]
	impImpersonate = 3, // RPC_C_IMP_LEVEL_IMPERSONATE

	[helpstring("The server process can impersonate the client's security context while acting on behalf of the client, or to make outgoing calls to other servers, using Cloaking, etc. See RPC_C_IMP_LEVEL_DELEGATE in MSDN for more details.")]
	impDelegate = 4, // RPC_C_IMP_LEVEL_DELEGATE

	[helpstring("Impersonation Level is not known.")]
	impUnknown = 128
};

[v1_enum]
[helpstring("Indicates meaning of a logical filter.")]
enum PSLFilterFlag
{
	[helpstring("The filter is not used.")]
	ffAny = 0,

	[helpstring("The filter is in use, and the value must be either ON or YES.")]
	ffON = 1,

	[helpstring("The filter is in use, and the value must be either OFF or NO.")]
	ffOFF = 2
};

[v1_enum]
[helpstring("Text-formatting flags for an IPv4 address.")]
enum PSLIPv4Format
{
	[helpstring("Default presentation of the address.")]
	ip4Default = 0,

	[helpstring("Use upper case for octets (valid when ip4Hex is on).")]
	ip4UpperCase = 1,

	[helpstring("Add zeros in front of each address octet as required to make 3 digits in total for decimal or 2 digits for hex.")]
	ip4Padded = 2,

	[helpstring("Convert each address octet into hex format.")]
	ip4Hex = 4
};

[v1_enum]
[helpstring("Text-formatting flags for an IPv6 address.")]
enum PSLIPv6Format
{
	[helpstring("Default presentation of the address.")]
	ip6Default = 0,

	[helpstring("Use upper case for hex symbols of the address (doesn't work with ip6WebAddress).")]
	ip6UpperCase = 1,

	[helpstring("Add zeros in front of each address part as required to make 4 digits in total (doesn't work with ip6WebAddress).")]
	ip6Padded = 2,

	[helpstring("Apply compression logic for zeros in the address.")]
	ip6Compressed = 4,

	[helpstring("Use Microsoft web-enabled presentation of the address.")]
	ip6WebAddress = 8
};

[v1_enum]
[helpstring("Service State.")]
enum PSLServiceState
{
	[helpstring("Service is not running.")]
	ssStopped = 1,

	[helpstring("Service is starting.")]
	ssStartPending = 2,

	[helpstring("Service is stopping.")]
	ssStopPending = 3,

	[helpstring("Service is running.")]
	ssRunning = 4,

	[helpstring("Service continue is pending.")]
	ssContinuePending = 5,

	[helpstring("Service pause is pending.")]
	ssPausePending = 6,

	[helpstring("Service is paused.")]
	ssPaused = 7
};

[v1_enum]
[helpstring("Service Type.")]
enum PSLServiceType
{
	[helpstring("Service runs in its own process.")]
	stOwnProcess = 16,

	[helpstring("Service shares a process with other services.")]
	stShareProcess = 32
};

[v1_enum]
[helpstring("Driver Type.")]
enum PSLDriverType
{
	[helpstring("Device driver.")]
	dtKernelDriver = 1,

	[helpstring("File system driver.")]
	dtSystemDriver = 2
};

[v1_enum]
[helpstring("Service Start Type.")]
enum PSLServiceStartType
{
	[helpstring("Service started automatically by the service control manager during system startup.")]
	sstAutoStart = 2,

	[helpstring("Service started by the service control manager when a process calls the StartService function.")]
	sstDemandStart = 3,

	[helpstring("Service cannot be started.")]
	sstDisabled = 4
};

[v1_enum]
[helpstring("Driver Start Type.")]
enum PSLDriverStartType
{
	[helpstring("Driver started by the system loader.")]
	dstBootStart = 0,

	[helpstring("Driver started by the IoInitSystem function.")]
	dstSystemStart = 1,

	[helpstring("Driver started automatically by the service control manager during system startup.")]
	dstAutoStart = 2,

	[helpstring("Driver started by the service control manager when a process calls the StartService function.")]
	dstDemandStart = 3,

	[helpstring("Driver cannot be started.")]
	dstDisabled = 4
};

[
	object,
	uuid(B3799D68-B5D2-4E9E-A4D2-96B746FFB540),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLSize : IDispatch
{
	[id(1), propget, helpstring("Specifies the rectangle's width. The units depend on in which context it is used.")]
	HRESULT Width([out, retval] long * pValue);

	[id(2), propget, helpstring("Specifies the rectangle's height. The units depend on in which context it is used.")]
	HRESULT Height([out, retval] long * pValue);
};

[
	object,
	uuid(E34E9C75-568F-4CA1-8A0D-C59E82430A03),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLRect : IDispatch
{
	[id(1), propget, helpstring("Specifies the x-coordinate of the upper-left corner of the rectangle.")]
	HRESULT Left([out, retval] long * pValue);

	[id(2), propget, helpstring("Specifies the y-coordinate of the upper-left corner of the rectangle.")]
	HRESULT Top([out, retval] long * pValue);

	[id(3), propget, helpstring("Specifies the x-coordinate of the lower-right corner of the rectangle.")]
	HRESULT Right([out, retval] long * pValue);

	[id(4), propget, helpstring("Specifies the y-coordinate of the lower-right corner of the rectangle.")]
	HRESULT Bottom([out, retval] long * pValue);
};

[
	object,
	uuid(50F28B2C-0D0A-41E7-8681-65B715072B44),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLCmdParam : IDispatch
{
	[id(1), propget, helpstring("Command name, if recognized.")]
	HRESULT Name([out, retval] BSTR * pValue);

	[id(2), propget, helpstring("Command value, if recognized.")]
	HRESULT Value([out, retval] BSTR * pValue);

	[id(3), propget, helpstring("Original command parameter.")]
	HRESULT Command([out, retval] BSTR * pValue);
};

[
	object,
	uuid(EA645A5E-3200-49E8-A717-701D4AA43CD1),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLCmdParams : IDispatch
{
	[id(DISPID_NEWENUM), propget]
	HRESULT _NewEnum([out, retval] IUnknown ** ppUnk);

	[id(DISPID_VALUE), propget, helpstring("Indexed-based accessor to collection elements.")]
	HRESULT Item([in] long Index, [out, retval] IPSLCmdParam ** ppValue);

	[id(1), propget, helpstring("Number of objects in collection.")]
	HRESULT Count([out, retval] long * pValue);
};

[
	object,
	uuid(922E84D8-A96E-413A-86E4-D69A78195EAA),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLEnvironmentVar : IDispatch
{
	[id(1), propget, helpstring("Environment Variable Name.")]
	HRESULT Name([out, retval] BSTR * pValue);

	[id(2), propget, helpstring("Environment Variable Value.")]
	HRESULT Value([out, retval] BSTR * pValue);
	[propput, id(2)] HRESULT Value([in] BSTR newValue);
};

[
	object,
	uuid(823E9F26-3026-445A-B41F-93CA084F2FA3),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLEnvironmentVars : IDispatch
{
	[id(DISPID_NEWENUM), propget]
	HRESULT _NewEnum([out, retval] IUnknown ** ppUnk);

	[id(DISPID_VALUE), propget, helpstring("Indexed-based accessor to collection elements.")]
	HRESULT Item([in] long Index, [out, retval] IPSLEnvironmentVar ** ppValue);

	[id(1), propget, helpstring("Number of objects in collection.")]
	HRESULT Count([out, retval] long * pValue);

	[id(2), helpstring("Updates the entire collection of environment variables.")]
	HRESULT Update();

	[id(3), helpstring("Looks up for environment variable in collection that has the matching name (not case-sensitive). When found, returns the Variable object; otherwise returns NULL.")]
	HRESULT Find([in] BSTR Name, [out, retval] IPSLEnvironmentVar ** ppValue);

	[id(4), helpstring("Adds a new environment variable and returns the new object, or NULL if failed. If the variable exists, returns the containing object.")]
	HRESULT Add([in] BSTR Name, [in] BSTR Value, [out, retval] IPSLEnvironmentVar ** ppValue);

	[id(5), helpstring("Removes an existing environment variable and the corresponding object, if any, and returns true, if successful.")]
	HRESULT Remove([in] BSTR Name, [out, retval] VARIANT_BOOL * pValue);
};

[
	object,
	uuid(FEC4B740-E25E-42EE-9476-3F8F98899C70),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLProcessIO : IDispatch
{
	[id(1), propget, helpstring("The number of read operations performed (VT_UI4 on Windows 2000 and VT_UI8 or any later OS).")]
	HRESULT ReadOperationCount([out, retval] VARIANT * pValue);

	[id(2), propget, helpstring("The number of write operations performed (VT_UI4 on Windows 2000 and VT_UI8 or any later OS).")]
	HRESULT WriteOperationCount([out, retval] VARIANT * pValue);

	[id(3), propget, helpstring("The number of I/O operations performed, other than read and write operations (VT_UI4 on Windows 2000 and VT_UI8 or any later OS).")]
	HRESULT OtherOperationCount([out, retval] VARIANT * pValue);

	[id(4), propget, helpstring("The number of bytes read (VT_UI4 on Windows 2000 and VT_UI8 or any later OS).")]
	HRESULT ReadTransferCount([out, retval] VARIANT * pValue);

	[id(5), propget, helpstring("The number of bytes written (VT_UI4 on Windows 2000 and VT_UI8 or any later OS).")]
	HRESULT WriteTransferCount([out, retval] VARIANT * pValue);

	[id(6), propget, helpstring("The number of bytes transferred during operations other than read and write operations (VT_UI4 on Windows 2000 and VT_UI8 or any later OS).")]
	HRESULT OtherTransferCount([out, retval] VARIANT * pValue);
};

[
	object,
	uuid(4B3110BF-A47F-4F80-BDDD-6120F740657B),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLProcessMemory : IDispatch
{
	[id(1), propget, helpstring("The number of page faults.")]
	HRESULT PageFaultCount([out, retval] long * pValue);

	[id(2), propget, helpstring("The change in the number of page faults since the last request.")]
	HRESULT PageFaultDelta([out, retval] long * pValue);

	[id(3), propget, helpstring("The peak working set size, in kilobytes.")]
	HRESULT PeakWorkingSetSize([out, retval] long * pValue);

	[id(4), propget, helpstring("The current working set size, in kilobytes.")]
	HRESULT WorkingSetSize([out, retval] long * pValue);

	[id(5), propget, helpstring("The peak paged pool usage, in kilobytes.")]
	HRESULT QuotaPeakPagedPoolUsage([out, retval] long * pValue);

	[id(6), propget, helpstring("The current paged pool usage, in kilobytes.")]
	HRESULT QuotaPagedPoolUsage([out, retval] long * pValue);

	[id(7), propget, helpstring("The peak nonpaged pool usage, in kilobytes.")]
	HRESULT QuotaPeakNonPagedPoolUsage([out, retval] long * pValue);

	[id(8), propget, helpstring("The current nonpaged pool usage, in kilobytes.")]
	HRESULT QuotaNonPagedPoolUsage([out, retval] long * pValue);

	[id(9), propget, helpstring("The current space allocated for the pagefile, in kilobytes. Those pages may or may not be in memory.")]
	HRESULT PagefileUsage([out, retval] long * pValue);

	[id(10), propget, helpstring("The peak space allocated for the pagefile, in kilobytes.")]
	HRESULT PeakPagefileUsage([out, retval] long * pValue);

	[id(11), propget, helpstring("The current amount of memory that cannot be shared with other processes, in kilobytes (0, if not available). Private bytes include memory that is committed and marked MEM_PRIVATE, data that is not mapped, and executable pages that have been written to.")]
	HRESULT PrivateUsage([out, retval] long * pValue);
};

[
	object,
	uuid(F0F53A73-43D8-424A-9D62-ADE73BC994CC),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLTable : IDispatch
{
	[id(1), propget, helpstring("Number of columns in the table.")]
	HRESULT nCols([out, retval] long * pValue);

	[id(2), propget, helpstring("Number of rows in the table.")]
	HRESULT nRows([out, retval] long * pValue);

	[id(3), helpstring("Reads value from the table from {Row, Col} position, using 0-based indexes.")]
	HRESULT GetValue([in] long RowIdx, [in] long ColIdx, [out, retval] VARIANT * pValue);

	[id(4), helpstring("Returns name of a column with the specified index.")]
	HRESULT GetColName([in] long ColIdx, [out, retval] BSTR * pValue);
};

[
	object,
	uuid(BD1DD794-ECCB-49A9-82AC-16DEB81531D6),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLVersionNumber : IDispatch
{
	[id(1), propget, helpstring("High Version.")]
	HRESULT High([out, retval] long * pValue);

	[id(2), propget, helpstring("Low Version.")]
	HRESULT Low([out, retval] long * pValue);

	[id(3), propget, helpstring("Build Number.")]
	HRESULT Build([out, retval] long * pValue);

	[id(4), propget, helpstring("Version Revision.")]
	HRESULT Revision([out, retval] long * pValue);

	[id(5), propget, helpstring("Full text presentation of the version.")]
	HRESULT Text([out, retval] BSTR * pValue);
};

[
	object,
	uuid(9570C00F-67ED-4E4C-901A-1200502295C9),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLModuleVersion : IDispatch
{
	[id(1), propget, helpstring("Indicates whether this object contains valid Version information.")]
	HRESULT IsValid([out, retval] VARIANT_BOOL * pValue);

	[id(2), propget, helpstring("Indicates whether the module contains debugging information.")]
	HRESULT IsDebug([out, retval] VARIANT_BOOL * pValue);

	[id(3), propget, helpstring("Indicates whether the module has been modified, i.e. not identical with the original.")]
	HRESULT IsPatched([out, retval] VARIANT_BOOL * pValue);

	[id(4), propget, helpstring("Indicates whether it is development version of the module, and not a commercially released product.")]
	HRESULT IsPreRelease([out, retval] VARIANT_BOOL * pValue);

	[id(5), propget, helpstring("File Version of the module.")]
	HRESULT FileVersion([out, retval] IPSLVersionNumber ** pValue);

	[id(6), propget, helpstring("Product Version of the module.")]
	HRESULT ProductVersion([out, retval] IPSLVersionNumber ** pValue);
};

[
	object,
	uuid(D9C7AF71-2F6E-4CED-83C4-7FF950D5454B),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLCore : IDispatch
{
	[id(1), propget, helpstring("Current core frequency in megaherz.")]
	HRESULT Frequency([out, retval] long * pValue);
};

[
	object,
	uuid(DBF6B86A-4C79-4E4A-94B2-ACA2198F8858),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLCores : IDispatch
{
	[id(DISPID_NEWENUM), propget]
	HRESULT _NewEnum([out, retval] IUnknown ** ppUnk);

	[id(DISPID_VALUE), propget, helpstring("Indexed-based accessor to collection elements.")]
	HRESULT Item([in] long Index, [out, retval] IPSLCore ** ppValue);

	[id(1), propget, helpstring("Number of objects in collection.")]
	HRESULT Count([out, retval] long * pValue);
};

[
	object,
	uuid(9F8BD328-5ADF-42E1-AA6F-C49ADEB5FAD0),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLProcessor : IDispatch
{
	[id(1), propget, helpstring("List of all CPU cores in the system.")]
	HRESULT Cores([out, retval] IPSLCores ** ppValue);

	[id(2), propget, helpstring("Full Processor Name.")]
	HRESULT Name([out, retval] BSTR * pValue);

	[id(3), propget, helpstring("Current and overall processor usage in percent from 0 to 100 (updated 5 times a second).")]
	HRESULT Usage([out, retval] short * pValue);
};

[
	object,
	uuid(16C64DE8-EA2D-4FC2-B2E4-AB0520CBE46C),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLMemory : IDispatch
{
	[id(1), propget, helpstring("A number between 0 and 100 that specifies the approximate percentage of physical memory that is in use (0 indicates no memory use and 100 indicates full memory use).")]
	HRESULT MemoryLoad([out, retval] short * pValue);

	[id(2), propget, helpstring("The amount of actual physical memory, in kilobytes.")]
	HRESULT TotalPhys([out, retval] long * pValue);

	[id(3), propget, helpstring("The amount of physical memory currently available, in kilobytes. This is the amount of physical memory that can be immediately reused without having to write its contents to disk first (the sum of the size of the standby, free, and zero lists).")]
	HRESULT AvailPhys([out, retval] long * pValue);

	[id(4), propget, helpstring("The current size of the committed memory limit, in kilobytes. This is physical memory plus the size of the page file, minus a small overhead.")]
	HRESULT TotalPageFile([out, retval] long * pValue);

	[id(5), propget, helpstring("The maximum amount of memory the current process can commit, in kilobytes. This value should be smaller than the system-wide available commit.")]
	HRESULT AvailPageFile([out, retval] long * pValue);

	[id(6), propget, helpstring("The size of the user-mode portion of the virtual address space of the calling process, in kilobytes.")]
	HRESULT TotalVirtual([out, retval] long * pValue);

	[id(7), propget, helpstring("The amount of unreserved and uncommitted memory currently in the user-mode portion of the virtual address space of the calling process, in kilobytes.")]
	HRESULT AvailVirtual([out, retval] long * pValue);

	[id(8), propget, helpstring("The amount of unreserved and uncommitted memory currently in the extended portion of the virtual address space of the calling process, in kilobytes.")]
	HRESULT AvailExtendedVirtual([out, retval] long * pValue);
};

[
	object,
	uuid(C1A6F4CD-CF12-432A-B9DD-CB6142FD8A3C),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLMonitor : IDispatch
{
	[id(1), propget, helpstring("Indicates whether the monitor is primary.")]
	HRESULT IsPrimary([out, retval] VARIANT_BOOL * pValue);

	[id(2), propget, helpstring("Name of the device represented in the system format.")]
	HRESULT DeviceName([out, retval] BSTR * pValue);

	[id(3), propget, helpstring("Full name of the monitor's model.")]
	HRESULT MonitorName([out, retval] BSTR * pValue);

	[id(4), propget, helpstring("Display monitor rectangle, expressed in virtual-screen coordinates.")]
	HRESULT Bounds([out, retval] IPSLRect ** ppValue);

	[id(5), propget, helpstring("The work area rectangle of the display monitor that can be used by applications, expressed in virtual-screen coordinates.")]
	HRESULT WorkArea([out, retval] IPSLRect ** ppValue);

	[id(6), propget, helpstring("Physical size of the display screen in millimeters.")]
	HRESULT PhysicalSize([out, retval] IPSLSize ** ppValue);

	[id(7), propget, helpstring("Current vertical refresh rate of the display, in cycles per second (Hz).")]
	HRESULT RefreshRate([out, retval] short * pValue);

	[id(8), propget, helpstring("Current color resolution of the device, in bits per pixel.")]
	HRESULT ColorRes([out, retval] short * pValue);
};
[
	object,
	uuid(9F7491BE-2B4F-4857-8831-50D57E1838D2),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLMonitors : IDispatch
{
	[id(DISPID_NEWENUM), propget]
	HRESULT _NewEnum([out, retval] IUnknown ** ppUnk);

	[id(DISPID_VALUE), propget, helpstring("Indexed-based accessor to collection elements.")]
	HRESULT Item([in] long Index, [out, retval] IPSLMonitor ** ppValue);

	[id(1), propget, helpstring("Number of objects in collection.")]
	HRESULT Count([out, retval] long * pValue);

	[id(2), helpstring("Updates the entire collection of Monitors.")]
	HRESULT Update();
};

[
	object,
	uuid(1F691AF0-D992-4D1A-9204-20905192872B),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLHardware : IDispatch
{
	[id(1), propget, helpstring("CPU information.")]
	HRESULT Processor([out, retval] IPSLProcessor ** ppValue);

	[id(2), propget, helpstring("Collection of all display monitors available in the system.")]
	HRESULT Monitors([out, retval] IPSLMonitors ** ppValue);
};

[
	object,
	uuid(A7312DE3-5DF7-4A5D-9612-83F3826C75BF),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLOSVersion : IDispatch
{
	[id(1), propget, helpstring("Simplified enumerator of the OS version.")]
	HRESULT OSVersion([out, retval] enum PSLOSMainVersion * pValue);

	[id(2), propget, helpstring("The major version number of the operating system.")]
	HRESULT OSMajor([out, retval] long * pValue);

	[id(3), propget, helpstring("The minor version number of the operating system.")]
	HRESULT OSMinor([out, retval] long * pValue);

	[id(4), propget, helpstring("The build number of the operating system.")]
	HRESULT OSBuild([out, retval] long * pValue);

	[id(5), propget, helpstring("Indicates whether the version of OS is either desktop or server for home use only.")]
	HRESULT IsHomeEdition([out, retval] VARIANT_BOOL * pValue);

	[id(6), propget, helpstring("OS Suit Mask that identifies the product suites available on the system.")]
	HRESULT SuitMask([out, retval] enum PSLOSSuitMask * pValue);

	[id(7), propget, helpstring("The major version number of the latest Service Pack installed on the system.")]
	HRESULT SPMajor([out, retval] long * pValue);

	[id(8), propget, helpstring("The minor version number of the latest Service Pack installed on the system.")]
	HRESULT SPMinor([out, retval] long * pValue);

	[id(9), propget, helpstring("Name of the latest Service Pack installed on the system, or empty string, if none installed.")]
	HRESULT SPName([out, retval] BSTR * pValue);
};

[
	object,
	uuid(5CD1BC38-1E61-4d7c-BC17-9BD0B8B916B7),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLOS : IDispatch
{
	[id(1), propget, helpstring("Indicates whether the OS is 64-bit.")]
	HRESULT Is64Bit([out, retval] VARIANT_BOOL * pValue);

	[id(2), propget, helpstring("Information about the OS version.")]
	HRESULT Version([out, retval] IPSLOSVersion ** ppValue);

	[id(3), propget, helpstring("Affinity Mask of the system (VT_UI4 for 32-bit and VT_UI8 for 64-bit).")]
	HRESULT AffinityMask([out, retval] VARIANT * pValue);

	[id(4), propget, helpstring("Name of the OS Product.")]
	HRESULT ProductName([out, retval] BSTR * pValue);

	[id(5), propget, helpstring("Product Id of the OS.")]
	HRESULT ProductId([out, retval] BSTR * pValue);

	[id(6), propget, helpstring("All information about the OS memory status.")]
	HRESULT Memory([out, retval] IPSLMemory ** ppValue);

	[id(7), helpstring("Returns path to a special folder in the system, or an empty string, if the folder does not exist.")]
	HRESULT GetSpecialFolder([in] enum PSLSpecialFolder Folder, [out, retval] BSTR * pValue);
};

[
	object,
	uuid(7F9EA295-FB9F-4791-ACEF-6F2A0F0C0D1F),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLDriver : IDispatch
{
	[id(1), propget, helpstring("System driver name as stored in the service control manager database.")]
	HRESULT Name([out, retval] BSTR * pValue);

	[id(2), propget, helpstring("Driver name for displaying to the end user.")]
	HRESULT DisplayName([out, retval] BSTR * pValue);

	[id(3), propget, helpstring("Driver description.")]
	HRESULT Description([out, retval] BSTR * pValue);

	[id(4), propget, helpstring("Full file path to the driver file.")]
	HRESULT Path([out, retval] BSTR * pValue);

	[id(5), propget, helpstring("Full file path to the driver file.")]
	HRESULT CurrentState([out, retval] enum PSLServiceState * pValue);

	[id(6), propget, helpstring("Driver Type.")]
	HRESULT Type([out, retval] enum PSLDriverType * pValue);

	[id(7), propget, helpstring("Names of drivers/classes or load ordering groups that must start before this driver.")]
	HRESULT Dependencies([out, retval] BSTR * pValue);

	[id(8), propget, helpstring("Driver Start Type.")]
	HRESULT StartType([out, retval] enum PSLDriverStartType * pValue);
};

[
	object,
	uuid(032809E2-9927-4A24-8752-904D4AC2988E),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLDrivers : IDispatch
{
	[id(DISPID_NEWENUM), propget]
	HRESULT _NewEnum([out, retval] IUnknown ** ppUnk);

	[id(DISPID_VALUE), propget, helpstring("Indexed-based accessor to collection elements.")]
	HRESULT Item([in] long Index, [out, retval] IPSLDriver ** ppValue);

	[id(1), propget, helpstring("Number of objects in collection.")]
	HRESULT Count([out, retval] long * pValue);

	[id(2), helpstring("Updates the entire collection of drivers from the system.")]
	HRESULT Update();

	[id(3), helpstring("Looks up the driver by its name.")]
	HRESULT Find([in] BSTR DriverName, [out, retval] IPSLDriver ** ppValue);
};

[
	object,
	uuid(414EAC81-D32A-4038-BAE9-E296DBA09C0E),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLWindowsFilter : IDispatch
{
	[id(1), propget, helpstring("Indicates enumeration of Top-Level windows.")]
	HRESULT TopLevel([out, retval] enum PSLFilterFlag * pValue);
	[propput, id(1)] HRESULT TopLevel([in] enum PSLFilterFlag newValue);

	[id(2), propget, helpstring("Indicates that the window must have text in it.")]
	HRESULT HasText([out, retval] enum PSLFilterFlag * pValue);
	[propput, id(2)] HRESULT HasText([in] enum PSLFilterFlag newValue);

	[id(3), propget, helpstring("Indicates that the window must be visible.")]
	HRESULT Visible([out, retval] enum PSLFilterFlag * pValue);
	[propput, id(3)] HRESULT Visible([in] enum PSLFilterFlag newValue);

	[id(4), propget, helpstring("Indicates that the window must be enabled.")]
	HRESULT Enabled([out, retval] enum PSLFilterFlag * pValue);
	[propput, id(4)] HRESULT Enabled([in] enum PSLFilterFlag newValue);

	[id(5), propget, helpstring("If not 0, ID of the thread for which to enumerate windows.")]
	HRESULT ThreadID([out, retval] long * pValue);
	[propput, id(5)] HRESULT ThreadID([in] long newValue);

	[id(6), propget, helpstring("If not 0, handle of the parent window, child windows for which must be enumerated.")]
	HRESULT ParentHandle([out, retval] VARIANT * pValue);
	[propput, id(6)] HRESULT ParentHandle([in] VARIANT newValue);

	[id(7), helpstring("Resets all filters to their default values.")]
	HRESULT Reset();
};

[
	object,
	uuid(D1035012-8CBB-411D-8112-14F119A65145),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLWindow : IDispatch
{
	[id(1), propget, helpstring("Command ID associated with the window.")]
	HRESULT ID([out, retval] VARIANT * pValue);
	[propput, id(1)] HRESULT ID([in] VARIANT newValue);

	[id(2), propget, helpstring("Window Handle (VT_UI4 for 32-bit and VT_UI8 for 64-bit).")]
	HRESULT Handle([out, retval] VARIANT * pValue);

	[id(3), propget, helpstring("Parent Window Object.")]
	HRESULT Parent([out, retval] IPSLWindow ** pValue);

	[id(4), propget, helpstring("Window Class Name.")]
	HRESULT ClassName([out, retval] BSTR * pValue);

	[id(5), propget, helpstring("ID of the thread that created this window.")]
	HRESULT ThreadID([out, retval] long * pValue);

	[id(6), propget, helpstring("ID of the process that created this window.")]
	HRESULT ProcessID([out, retval] long * pValue);

	[id(7), propget, helpstring("Verifies whether the window is still valid.")]
	HRESULT IsValid([out, retval] VARIANT_BOOL * pValue);

	[id(8), propget, helpstring("Indicates whether it is a child window.")]
	HRESULT IsChild([out, retval] VARIANT_BOOL * pValue);

	[id(9), propget, helpstring("Indicates whether it is a top-level window.")]
	HRESULT IsTopLevel([out, retval] VARIANT_BOOL * pValue);

	[id(10), propget, helpstring("Indicates whether the window is visible (calls API IsWindowVisible).")]
	HRESULT IsVisible([out, retval] VARIANT_BOOL * pValue);

	[id(11), propget, helpstring("Indicates whether the window doesn't belong to the current process.")]
	HRESULT IsExternal([out, retval] VARIANT_BOOL * pValue);

	[id(12), propget, helpstring("Indicates whether the parent window belongs to a different process than this window.")]
	HRESULT IsBridge([out, retval] VARIANT_BOOL * pValue);

	[id(13), propget, helpstring("Enabled state of the window.")]
	HRESULT Enabled([out, retval] VARIANT_BOOL * pValue);
	[propput, id(13)] HRESULT Enabled([in] VARIANT_BOOL newValue);

	[id(14), propget, helpstring("Window Text.")]
	HRESULT Text([out, retval] BSTR * pValue);
	[propput, id(14)] HRESULT Text([in] BSTR newValue);

	[id(15), propget, helpstring("User Data.")]
	HRESULT UserData([out, retval] VARIANT * pValue);
	[propput, id(15)] HRESULT UserData([in] VARIANT newValue);

	[id(16), propget, helpstring("Window Style.")]
	HRESULT Style([out, retval] long * pValue);
	[propput, id(16)] HRESULT Style([in] long newValue);

	[id(17), propget, helpstring("Window Extended Style.")]
	HRESULT StyleEx([out, retval] long * pValue);
	[propput, id(17)] HRESULT StyleEx([in] long newValue);

	[id(18), helpstring("Sends a message to the window via API SendMessage.")]
	HRESULT SendMsg([in] long Msg, [in] VARIANT wParam, [in] VARIANT lParam, [out, retval] VARIANT * pValue);

	[id(19), helpstring("Posts a message to the window via API PostMessage.")]
	HRESULT PostMsg([in] long Msg, [in] VARIANT wParam, [in] VARIANT lParam, [out, retval] VARIANT_BOOL * pValue);

	[id(20), helpstring("Destroys the contained window using API DestroyWindow.")]
	HRESULT Destroy([out, retval] VARIANT_BOOL * pValue);

	[id(21), helpstring("Calls WindowUpdate API to update the window.")]
	HRESULT Update([out, retval] VARIANT_BOOL * pValue);
};

[
	object,
	uuid(382E8065-ACC2-4A64-A067-6697E80862E7),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLWindows : IDispatch
{
	[id(DISPID_NEWENUM), propget]
	HRESULT _NewEnum([out, retval] IUnknown ** ppUnk);

	[id(DISPID_VALUE), propget, helpstring("Indexed-based accessor to collection elements.")]
	HRESULT Item([in] long Index, [out, retval] IPSLWindow ** ppValue);

	[id(1), propget, helpstring("Number of objects in collection.")]
	HRESULT Count([out, retval] long * pValue);

	[id(2), propget, helpstring("Enumeration filter.")]
	HRESULT Filter([out, retval] IPSLWindowsFilter ** ppValue);

	[id(3), helpstring("Updates the entire collection of windows.")]
	HRESULT Update();

	[id(4), helpstring("Looks up the window object with specified window handle.")]
	HRESULT Find([in] VARIANT Handle, [out, retval] IPSLWindow ** ppValue);
};

[
	object,
	uuid(DDAB12FF-E95A-47CC-AF81-9E021DC69976),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLThread: IDispatch
{
	[id(1), propget, helpstring("Thread ID.")]
	HRESULT ThreadID([out, retval] long * pValue);

	[id(2), propget, helpstring("Thread Priority.")]
	HRESULT Priority([out, retval] enum PSLThreadPriority * pValue);
	[propput, id(2)] HRESULT Priority([in] enum PSLThreadPriority newValue);

	[id(3), propget, helpstring("Flag that controls Priority Boost of the thread.")]
	HRESULT PriorityBoost([out, retval] VARIANT_BOOL * pValue);
	[propput, id(3)] HRESULT PriorityBoost([in] VARIANT_BOOL newValue);

	[id(4), propget, helpstring("Thread Affinity Mask (VT_UI4 for 32-bit and VT_UI8 for 64-bit).")]
	HRESULT AffinityMask([out, retval] VARIANT * pValue);
	[id(4), propput] HRESULT AffinityMask([in] VARIANT newValue);

	[id(5), propget, helpstring("Indicates whether this thread is the current thread.")]
	HRESULT IsCurrent([out, retval] VARIANT_BOOL * pValue);

	[id(6), propget, helpstring("Indicates whether this thread is still alive.")]
	HRESULT IsAlive([out, retval] VARIANT_BOOL * pValue);

	[id(7), propget, helpstring("Date and time when the thread was created.")]
	HRESULT Created([out, retval] DATE * pValue);

	[id(8), helpstring("Posts a message to the thread via API PostThreadMessage.")]
	HRESULT PostMsg([in] long Msg, [in] VARIANT wParam, [in] VARIANT lParam, [out, retval] VARIANT_BOOL * pValue);

	[id(9), helpstring("Waits until the thread signals and then returns true. If timed-out, it returns false.")]
	HRESULT Wait([in] long TimeOut, [out, retval] VARIANT_BOOL * pValue);

	[id(10), helpstring("Terminates the thread, providing the specified exit code.")]
	HRESULT Terminate([in] long ExitCode, [out, retval] VARIANT_BOOL * pValue);

	[id(11), helpstring("Attempts suspending the thread using API SuspendThread. See in MSDN for the meaning of the return value.")]
	HRESULT Suspend([out, retval] long * pValue);

	[id(12), helpstring("Attempts resuming the thread using API ResumeThread. See in MSDN for the meaning of the return value.")]
	HRESULT Resume([out, retval] long * pValue);
};

[
	object,
	uuid(8CC16330-D907-46E9-9BCF-EECABC5FE02E),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLThreads : IDispatch
{
	[id(DISPID_NEWENUM), propget]
	HRESULT _NewEnum([out, retval] IUnknown ** ppUnk);

	[id(DISPID_VALUE), propget, helpstring("Indexed-based accessor to collection elements.")]
	HRESULT Item([in] long Index, [out, retval] IPSLThread ** ppValue);

	[id(1), propget, helpstring("Number of objects in collection.")]
	HRESULT Count([out, retval] long * pValue);

	[id(2), helpstring("Updates the entire collection of threads.")]
	HRESULT Update();

	[id(3), helpstring("Looks up the thread object with specified thread ID.")]
	HRESULT Find([in] long ThreadID, [out, retval] IPSLThread ** ppValue);

	[id(4), helpstring("Looks up the object that represents the current thread.")]
	HRESULT FindCurrent([out, retval] IPSLThread ** ppValue);
};

[
	object,
	uuid(F68AB032-419C-4A11-ABF9-58896CE44463),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLPrivilege : IDispatch
{
	[id(1), propget, helpstring("Privilege Name.")]
	HRESULT Name([out, retval] BSTR * pValue);

	[id(2), propget, helpstring("Flag that indicates whether the privilege is enabled.")]
	HRESULT Enabled([out, retval] VARIANT_BOOL * pValue);
	[propput, id(2)] HRESULT Enabled([in] VARIANT_BOOL newValue);

	[id(3), propget, helpstring("Indicates whether the Privilege is enabled by default.")]
	HRESULT Default([out, retval] VARIANT_BOOL * pValue);

	[id(4), propget, helpstring("Indicates whether the Privilege was removed.")]
	HRESULT Removed([out, retval] VARIANT_BOOL * pValue);

	[id(5), propget, helpstring("Indicates whether the Privilege was used to gain access to an object or service.")]
	HRESULT UsedForAccess([out, retval] VARIANT_BOOL * pValue);

	[id(6), propget, helpstring("The Locally Unique Identifier (VT_UI4 on Windows 2000 and VT_UI8 or any later OS).")]
	HRESULT LUID([out, retval] VARIANT * pValue);
};

[
	object,
	uuid(BBD6C199-6503-495C-A699-7036B9486F99),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLPrivileges : IDispatch
{
	[id(DISPID_NEWENUM), propget]
	HRESULT _NewEnum([out, retval] IUnknown ** ppUnk);

	[id(DISPID_VALUE), propget, helpstring("Indexed-based accessor to collection elements.")]
	HRESULT Item([in] long Index, [out, retval] IPSLPrivilege ** ppValue);

	[id(1), propget, helpstring("Number of objects in collection.")]
	HRESULT Count([out, retval] long * pValue);

	[id(2), helpstring("Updates the entire collection of Privileges.")]
	HRESULT Update();

	[id(3), helpstring("Looks up for Privilege in collection that has the matching name (not case-sensitive). When found, returns the Privilege object; otherwise returns NULL.")]
	HRESULT Find([in] BSTR PrivilegeName, [out, retval] IPSLPrivilege ** ppValue);
};

[
	object,
	uuid(AF722FAB-67B3-4020-ABF6-F234ABAB654F),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLModule : IDispatch
{
	[id(1), propget, helpstring("Module File Name.")]
	HRESULT FileName([out, retval] BSTR * pValue);

	[id(2), propget, helpstring("Module File Path.")]
	HRESULT FilePath([out, retval] BSTR * pValue);

	[id(3), propget, helpstring("Module File Directory.")]
	HRESULT FileDir([out, retval] BSTR * pValue);

	[id(4), propget, helpstring("Module Version Information.")]
	HRESULT Version([out, retval] IPSLModuleVersion ** ppValue);
};

[
	object,
	uuid(80BA9CB5-A2A9-4373-B637-AFB41DDD919B),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLModules : IDispatch
{
	[id(DISPID_NEWENUM), propget]
	HRESULT _NewEnum([out, retval] IUnknown ** ppUnk);

	[id(DISPID_VALUE), propget, helpstring("Indexed-based accessor to collection elements.")]
	HRESULT Item([in] long Index, [out, retval] IPSLModule ** ppValue);

	[id(1), propget, helpstring("Number of objects in collection.")]
	HRESULT Count([out, retval] long * pValue);

	[id(2), helpstring("Updates the entire collection of modules.")]
	HRESULT Update();
};

[
	object,
	uuid(114193FF-73E2-4689-BCB4-93901D98F135),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLCurrentProcess : IDispatch
{
	[id(1), propget, helpstring("Process ID.")]
	HRESULT ProcessID([out, retval] long * pValue);

	[id(2), propget, helpstring("Console window handle or 0 when there is none (VT_UI4 for 32-bit and VT_UI8 for 64-bit).")]
	HRESULT ConsoleWnd([out, retval] VARIANT * pValue);

	[id(3), propget, helpstring("File name of the process.")]
	HRESULT FileName([out, retval] BSTR * pValue);

	[id(4), propget, helpstring("Full file path of the process.")]
	HRESULT FilePath([out, retval] BSTR * pValue);

	[id(5), propget, helpstring("Full directory path where the application resides.")]
	HRESULT FileDir([out, retval] BSTR * pValue);

	[id(6), propget, helpstring("Current directory for the process.")]
	HRESULT CurrentDir([out, retval] BSTR * pValue);
	[id(6), propput] HRESULT CurrentDir([in] BSTR newValue);

	[id(7), propget, helpstring("Date and time when the process was created.")]
	HRESULT Created([out, retval] DATE * pValue);

	[id(8), propget, helpstring("Checks if the current process is 64-bit.")]
	HRESULT Is64Bit([out, retval] VARIANT_BOOL * pValue);

	[id(9), propget, helpstring("Indicates whether the current process is being debugged.")]
	HRESULT IsDebugged([out, retval] VARIANT_BOOL * pValue);

	[id(10), propget, helpstring("Number of open handles in the current process.")]
	HRESULT HandleCount([out, retval] long * pValue);

	[id(11), propget, helpstring("Number of GDI objects from GUI handles in use by the current process.")]
	HRESULT GDICount([out, retval] long * pValue);

	[id(12), propget, helpstring("Number of USER objects from GUI handles in use by the current process.")]
	HRESULT USERCount([out, retval] long * pValue);

	[id(13), propget, helpstring("Shutdown Level Parameter.")]
	HRESULT ShutdownLevel([out, retval] long * pValue);
	[id(13), propput] HRESULT ShutdownLevel([in] long newValue);

	[id(14), propget, helpstring("Shutdown Flags Parameter.")]
	HRESULT ShutdownFlags([out, retval] long * pValue);
	[id(14), propput] HRESULT ShutdownFlags([in] long newValue);

	[id(15), propget, helpstring("Process Priority.")]
	HRESULT Priority([out, retval] enum PSLProcessPriority * pValue);
	[id(15), propput] HRESULT Priority([in] enum PSLProcessPriority newValue);

	[id(16), propget, helpstring("Affinity Mask of the process (VT_UI4 for 32-bit and VT_UI8 for 64-bit).")]
	HRESULT AffinityMask([out, retval] VARIANT * pValue);
	[id(16), propput] HRESULT AffinityMask([in] VARIANT newValue);

	[id(17), propget, helpstring("Information about memory usage in the current process.")]
	HRESULT Memory([out, retval] IPSLProcessMemory ** ppValue);

	[id(18), propget, helpstring("Information about Inputs and Outputs for the current process.")]
	HRESULT IO([out, retval] IPSLProcessIO ** ppValue);

	[id(19), propget, helpstring("Information from the Version resource of the current process module.")]
	HRESULT Version([out, retval] IPSLModuleVersion ** ppValue);

	[id(20), propget, helpstring("Collection of all modules loaded by the current process.")]
	HRESULT Modules([out, retval] IPSLModules ** ppValue);

	[id(21), propget, helpstring("Collection of environment variables in the current process.")]
	HRESULT EnvVars([out, retval] IPSLEnvironmentVars ** ppValue);

	[id(22), propget, helpstring("Collection of commands from the command line.")]
	HRESULT Commands([out, retval] IPSLCmdParams ** ppValue);

	[id(23), propget, helpstring("Collection of all threads created by the current process.")]
	HRESULT Threads([out, retval] IPSLThreads ** ppValue);

	[id(24), propget, helpstring("Collection of all windows created by the current process.")]
	HRESULT Windows([out, retval] IPSLWindows ** ppValue);
};

[
	object,
	uuid(B7513F04-94D9-4D63-85D2-1350B7B7C8D6),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLProcess : IDispatch
{
	[id(1), propget, helpstring("Process ID.")]
	HRESULT ProcessID([out, retval] long * pValue);

	[id(2), propget, helpstring("File name of the process.")]
	HRESULT FileName([out, retval] BSTR * pValue);

	[id(3), propget, helpstring("Full file path of the process.")]
	HRESULT FilePath([out, retval] BSTR * pValue);

	[id(4), propget, helpstring("Commad Line that was used for launching the process.")]
	HRESULT CommandLine([out, retval] BSTR * pValue);

	[id(5), propget, helpstring("User Account Name under which the process is running.")]
	HRESULT UserName([out, retval] BSTR * pValue);

	[id(6), propget, helpstring("Domain name of the user account under which the process is running.")]
	HRESULT DomainName([out, retval] BSTR * pValue);

	[id(7), propget, helpstring("Number of threads created by the process.")]
	HRESULT ThreadCount([out, retval] long * pValue);

	[id(8), propget, helpstring("Number of open handles in the process.")]
	HRESULT HandleCount([out, retval] long * pValue);

	[id(9), propget, helpstring("Number of GDI objects from GUI handles in use by the process.")]
	HRESULT GDICount([out, retval] long * pValue);

	[id(10), propget, helpstring("Number of USER objects from GUI handles in use by the process.")]
	HRESULT USERCount([out, retval] long * pValue);

	[id(11), propget, helpstring("Process Priority.")]
	HRESULT Priority([out, retval] enum PSLProcessPriority * pValue);

	[id(12), propget, helpstring("Affinity Mask of the process (VT_UI4 for 32-bit and VT_UI8 for 64-bit).")]
	HRESULT AffinityMask([out, retval] VARIANT * pValue);
	[id(12), propput] HRESULT AffinityMask([in] VARIANT newValue);

	[id(13), propget, helpstring("Indicates whether the process is 64-bit.")]
	HRESULT Is64Bit([out, retval] VARIANT_BOOL * pValue);

	[id(14), propget, helpstring("Date and time when the process was created.")]
	HRESULT Created([out, retval] DATE * pValue);

	[id(15), helpstring("Attempts killing the process and returns indication of success.")]
	HRESULT Kill([out, retval] VARIANT_BOOL * pValue);
};

[
	object,
	uuid(ECA105F1-3754-45A8-B800-F126FA2C87AA),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLProcesses : IDispatch
{
	[id(DISPID_NEWENUM), propget]
	HRESULT _NewEnum([out, retval] IUnknown ** ppUnk);

	[id(DISPID_VALUE), propget, helpstring("Indexed-based accessor to collection elements.")]
	HRESULT Item([in] long Index, [out, retval] IPSLProcess ** ppValue);

	[id(1), propget, helpstring("Number of objects in collection.")]
	HRESULT Count([out, retval] long * pValue);

	[id(2), propget, helpstring("Type of processes that need to be enumerated. Default is enumForCurrentUser.")]
	HRESULT EnumUserType([out, retval] enum PSLEnumUserType * pValue);
	[propput, id(2)] HRESULT EnumUserType([in] enum PSLEnumUserType newValue);

	[id(3), helpstring("Updates the entire collection of Processes from the system.")]
	HRESULT Update();

	[id(4), helpstring("Looks up for Process in collection with matching Process ID. When found, returns the Process object; otherwise returns NULL.")]
	HRESULT Find([in] long ProcessID, [out, retval] IPSLProcess ** ppValue);
};

[
	object,
	uuid(3EF4CCA4-C2C2-43E7-AE9E-5E7323BFC0ED),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLService : IDispatch
{
	[id(1), propget, helpstring("System service name as stored in the service control manager database.")]
	HRESULT Name([out, retval] BSTR * pValue);

	[id(2), propget, helpstring("Service name for displaying to the end user.")]
	HRESULT DisplayName([out, retval] BSTR * pValue);

	[id(3), propget, helpstring("Service description.")]
	HRESULT Description([out, retval] BSTR * pValue);

	[id(4), propget, helpstring("Full file path to the service file.")]
	HRESULT Path([out, retval] BSTR * pValue);

	[id(5), propget, helpstring("Full file path to the service file.")]
	HRESULT CurrentState([out, retval] enum PSLServiceState * pValue);

	[id(6), propget, helpstring("Service type.")]
	HRESULT Type([out, retval] enum PSLServiceType * pValue);

	[id(7), propget, helpstring("Indicates whether the service can interact with the desktop.")]
	HRESULT IsInteractive([out, retval] VARIANT_BOOL * pValue);

	[id(8), propget, helpstring("The name of the account that the service process will be logged on as when it runs.")]
	HRESULT LogOnAs([out, retval] BSTR * pValue);

	[id(9), propget, helpstring("Names of services or load ordering groups that must start before this service.")]
	HRESULT Dependencies([out, retval] BSTR * pValue);

	[id(10), propget, helpstring("Service Start Type.")]
	HRESULT StartType([out, retval] enum PSLServiceStartType * pValue);

	[id(11), propget, helpstring("Service Process ID.")]
	HRESULT ProcessID([out, retval] long * pValue);

	[id(12), helpstring("Attempts to start the service. Returns 0 when successful or error code as documented for API StartService.")]
	HRESULT Start([out, retval] long * ppValue);

	[id(13), helpstring("Attempts to start the service with parameters. Returns 0 when successful or error code as documented for API StartService.")]
	HRESULT StartEx([in] SAFEARRAY(BSTR) CmdParams, [out, retval] long * ppValue);

	[id(14), helpstring("Attempts to stop the service. Returns 0 when successful or error code as documented for API ControlService.")]
	HRESULT Stop([out, retval] long * ppValue);
};

[
	object,
	uuid(FB6CDE61-1478-4BC6-AF60-EB9B02E59D18),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLServices : IDispatch
{
	[id(DISPID_NEWENUM), propget]
	HRESULT _NewEnum([out, retval] IUnknown ** ppUnk);

	[id(DISPID_VALUE), propget, helpstring("Indexed-based accessor to collection elements.")]
	HRESULT Item([in] long Index, [out, retval] IPSLService ** ppValue);

	[id(1), propget, helpstring("Number of objects in collection.")]
	HRESULT Count([out, retval] long * pValue);

	[id(2), helpstring("Updates the collection of Services.")]
	HRESULT Update();

	[id(3), helpstring("Looks up the service by its name.")]
	HRESULT Find([in] BSTR ServiceName, [out, retval] IPSLService ** ppValue);
};

[
	object,
	uuid(8D7B1EF0-A1BF-4521-B54E-B9D8F78CE964),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLSoftware : IDispatch
{
	[id(1), propget, helpstring("Reference namespace to all information about the Operational System.")]
	HRESULT OS([out, retval] IPSLOS ** ppValue);

	[id(2), propget, helpstring("Collection of all drivers installed in the system.")]
	HRESULT Drivers([out, retval] IPSLDrivers ** ppValue);

	[id(3), propget, helpstring("Collection of all processes running in the system.")]
	HRESULT Processes([out, retval] IPSLProcesses ** ppValue);

	[id(4), propget, helpstring("Collection of all services installed in the system.")]
	HRESULT Services([out, retval] IPSLServices ** ppValue);

	[id(5), helpstring("Retrieves the Version resource information from a module.")]
	HRESULT GetModuleVersion([in] BSTR ModulePath, [out, retval] IPSLModuleVersion ** ppValue);

	[id(6), helpstring("Creates a new PSLWindow object from a window handle.")]
	HRESULT WindowFromHandle([in] VARIANT Handle, [out, retval] IPSLWindow ** ppValue);

	[id(7), helpstring("Retrieves ID of the process that created the thread with specified ID.")]
	HRESULT ProcessIDFromThreadID([in] long ThreadID, [out, retval] long * pValue);
};

[
	object,
	uuid(AB695967-894D-4B09-B474-884521B47FC0),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLIPv4 : IDispatch
{
	[id(1), propget, helpstring("Address 1.")]
	HRESULT A1([out, retval] short * pValue);
	[propput, id(1)] HRESULT A1([in] short newValue);

	[id(2), propget, helpstring("Address 2.")]
	HRESULT A2([out, retval] short * pValue);
	[propput, id(2)] HRESULT A2([in] short newValue);

	[id(3), propget, helpstring("Address 3.")]
	HRESULT A3([out, retval] short * pValue);
	[propput, id(3)] HRESULT A3([in] short newValue);

	[id(4), propget, helpstring("Address 4.")]
	HRESULT A4([out, retval] short * pValue);
	[propput, id(4)] HRESULT A4([in] short newValue);

	[id(5), propget, helpstring("Port number in the address.")]
	HRESULT Port([out, retval] long * pValue);
	[propput, id(5)] HRESULT Port([in] long newValue);

	[id(6), propget, helpstring("Compressed 32-bit numerical address presentation.")]
	HRESULT Address([out, retval] long * pValue);
	[propput, id(6)] HRESULT Address([in] long newValue);

	[id(7), propget, helpstring("Text presentation of the address.")]
	HRESULT Text([out, retval] BSTR * pValue);
	[propput, id(7)] HRESULT Text([in] BSTR newValue);

	[id(8), propget, helpstring("Format flags for text presentation of the address.")]
	HRESULT Format([out, retval] enum PSLIPv4Format * pValue);
	[propput, id(8)] HRESULT Format([in] enum PSLIPv4Format newValue);

	[id(9), helpstring("Sets all address parameters to their default values, and optionally Format.")]
	HRESULT Clear([in, defaultvalue(0)] VARIANT_BOOL bClearFormat);
};
[
	object,
	uuid(58B3DD07-F721-42BB-84F4-77D3B9FF652C),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLIPv6 : IDispatch
{
	[id(1), propget, helpstring("Address 1.")]
	HRESULT A1([out, retval] long * pValue);
	[propput, id(1)] HRESULT A1([in] long newValue);

	[id(2), propget, helpstring("Address 2.")]
	HRESULT A2([out, retval] long * pValue);
	[propput, id(2)] HRESULT A2([in] long newValue);

	[id(3), propget, helpstring("Address 3.")]
	HRESULT A3([out, retval] long * pValue);
	[propput, id(3)] HRESULT A3([in] long newValue);

	[id(4), propget, helpstring("Address 4.")]
	HRESULT A4([out, retval] long * pValue);
	[propput, id(4)] HRESULT A4([in] long newValue);

	[id(5), propget, helpstring("Address 5.")]
	HRESULT A5([out, retval] long * pValue);
	[propput, id(5)] HRESULT A5([in] long newValue);

	[id(6), propget, helpstring("Address 6.")]
	HRESULT A6([out, retval] long * pValue);
	[propput, id(6)] HRESULT A6([in] long newValue);

	[id(7), propget, helpstring("Address 7.")]
	HRESULT A7([out, retval] long * pValue);
	[propput, id(7)] HRESULT A7([in] long newValue);

	[id(8), propget, helpstring("Address 8.")]
	HRESULT A8([out, retval] long * pValue);
	[propput, id(8)] HRESULT A8([in] long newValue);

	[id(9), propget, helpstring("Port number in the address.")]
	HRESULT Port([out, retval] long * pValue);
	[propput, id(9)] HRESULT Port([in] long newValue);

	[id(10), propget, helpstring("Prefix Length in the address (the number of shared initial bits), or 0, if undefined.")]
	HRESULT Prefix([out, retval] long * pValue);
	[propput, id(10)] HRESULT Prefix([in] long newValue);

	[id(11), propget, helpstring("Text presentation of the address.")]
	HRESULT Text([out, retval] BSTR * pValue);
	[propput, id(11)] HRESULT Text([in] BSTR newValue);

	[id(12), propget, helpstring("Format flags for text presentation of the address.")]
	HRESULT Format([out, retval] enum PSLIPv6Format * pValue);
	[propput, id(12)] HRESULT Format([in] enum PSLIPv6Format newValue);

	[id(13), helpstring("Sets all address parameters to their default values, and optionally Format.")]
	HRESULT Clear([in, defaultvalue(0)] VARIANT_BOOL bClearFormat);
};

[
	object,
	uuid(F268E53D-0480-44F2-8A64-9A676238A021),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLNetwork : IDispatch
{
	[id(1), propget, helpstring("Current computer name.")]
	HRESULT PCName([out, retval] BSTR * pValue);

	[id(2), propget, helpstring("Name of the domain that PC belongs to.")]
	HRESULT DomainName([out, retval] BSTR * pValue);

	[id(3), helpstring("Returns a new IPv4 object from a text string, or NULL, if failed to parse the string.")]
	HRESULT IPv4FromString([in, defaultvalue(NULL)] BSTR Address, [out, retval] IPSLIPv4 ** ppValue);

	[id(4), helpstring("Returns a new IPv6 object from a text string, or NULL, if failed to parse the string.")]
	HRESULT IPv6FromString([in, defaultvalue(NULL)] BSTR Address, [out, retval] IPSLIPv6 ** ppValue);
};

[
	object,
	uuid(9FB46199-3B26-444E-8F64-B3B9D980E1DC),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLUser : IDispatch
{
	[id(1), propget, helpstring("Name of the user currently logged into the system.")]
	HRESULT Name([out, retval] BSTR * pValue);
};

[
	object,
	uuid(6A5A8248-3492-4EF9-A4BD-3B3F5DB41EFC),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLAccount : IDispatch
{
};

[
	object,
	uuid(61C381B7-1306-4168-AE84-657C4CB39C7B),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLAccounts : IDispatch
{
	[id(DISPID_NEWENUM), propget]
	HRESULT _NewEnum([out, retval] IUnknown ** ppUnk);

	[id(DISPID_VALUE), propget, helpstring("Indexed-based accessor to collection elements.")]
	HRESULT Item([in] long Index, [out, retval] IPSLAccount ** ppValue);

	[id(1), propget, helpstring("Number of elements in the collection of accounts.")]
	HRESULT Count([out, retval] long * pValue);

	[id(2), helpstring("Updates the collection of Accounts from the system.")]
	HRESULT Update();
};

[
	object,
	uuid(01553B65-EE91-4695-88EB-9624380373F4),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLSecurity : IDispatch
{
	[id(1), propget, helpstring("Reference to information about the OS user currently logged in.")]
	HRESULT User([out, retval] IPSLUser ** ppValue);

	[id(2), propget, helpstring("Reference to the collection of all User Accounts in the system.")]
	HRESULT Accounts([out, retval] IPSLAccounts ** ppValue);

	[id(3), propget, helpstring("Reference to the collection of privileges available to the current process.")]
	HRESULT Privileges([out, retval] IPSLPrivileges ** pValue);

	[id(4), helpstring("Retrieves Access Mask for the specified Named Object.")]
	HRESULT GetNamedObjectAccess([in] enum PSLNamedType nt, [in] BSTR ObjectName, [out, defaultvalue(NULL)] long * ErrorCode, [out, retval] long * pValue);
};

[
	object,
	uuid(EBEFFA71-1967-4999-92FE-F14929419533),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLWMI : IDispatch
{
	[id(1), propget, helpstring("Default WMI Namespace as set in the system.")]
	HRESULT DefaultNamespace([out, retval] BSTR * pValue);
	[id(1), propput] HRESULT DefaultNamespace([in] BSTR newValue);

	[id(2), propget, helpstring("Default level of Impersonation used by WMI for scripting environments.")]
	HRESULT DefaultImpersonationLevel([out, retval] enum PSLImpersonationLevel * pValue);

	[id(3), propget, helpstring("Directory where WMI is installed.")]
	HRESULT InstallationDir([out, retval] BSTR * pValue);

	[id(4), propget, helpstring("WMI Version.")]
	HRESULT Version([out, retval] BSTR * pValue);

	[id(5), propget, helpstring("When exWMIError is raised by the interface, LastError contains the error code that was returned from WMI.")]
	HRESULT LastError([out, retval] long * pValue);

	[id(6), helpstring("Returns a single value from WMI, or an empty object when failed.")]
	HRESULT GetValue([in] BSTR NameSpace, [in] BSTR ClassName, [in] BSTR ValueName, [out, retval] VARIANT * pValue);

	[id(7), helpstring("For a single-record WMI class, it takes a comma-separated list of columns and returns their values from the first record as an array of objects.")]
	HRESULT GetColValues([in] BSTR NameSpace, [in] BSTR ClassName, [in] BSTR ValueNamesCSV, [out, retval] SAFEARRAY(VARIANT) * pValue);

	[id(8), helpstring("For a multi-record WMI class, it takes a single column name and returns all record values for that column as an array of objects.")]
	HRESULT GetRowValues([in] BSTR NameSpace, [in] BSTR ClassName, [in] BSTR ValueName, [out, retval] SAFEARRAY(VARIANT) * pValue);

	[id(9), helpstring("Queries a WMI class for all column names, and returns them as an array of strings.")]
	HRESULT GetColNames([in] BSTR NameSpace, [in] BSTR ClassName, [out, retval] SAFEARRAY(BSTR) * pValue);

	[id(10), helpstring("Returns a table of data from WMI using WQL query, or NULL when failed.")]
	HRESULT GetData([in] BSTR NameSpace, [in] BSTR WQL, [out, retval] IPSLTable ** ppValue);
};

[
	object,
	uuid(ACDC00D6-DD72-4639-94D6-A0D9A744AF0D),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLTools : IDispatch
{
	[id(1), propget, helpstring("Reference to the namespace of Windows Management Instrumentation.")]
	HRESULT WMI([out, retval] IPSLWMI ** ppValue);
};

[
	object,
	uuid(PSL_Interface),
	helpcontext(7035943),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IPSLSystem : IDispatch
{
	[id(1), propget, helpstring("Reference to the namespace for all software information in the system.")]
	HRESULT Software([out, retval] IPSLSoftware ** ppValue);

	[id(2), propget, helpstring("Reference to the namespace for all hardware information in the system.")]
	HRESULT Hardware([out, retval] IPSLHardware ** ppValue);

	[id(3), propget, helpstring("Reference to the namespace for all networking information in the system.")]
	HRESULT Network([out, retval] IPSLNetwork ** ppValue);

	[id(4), propget, helpstring("Reference namespace to all information about the current process.")]
	HRESULT Process([out, retval] IPSLCurrentProcess ** ppValue);

	[id(5), propget, helpstring("Reference namespace to all security-related information in the system.")]
	HRESULT Security([out, retval] IPSLSecurity ** ppValue);

	[id(6), propget, helpstring("Namespace for all auxiliary tools/utilities implemented within the library.")]
	HRESULT Tools([out, retval] IPSLTools ** ppValue);

	[id(7), helpstring("Translates/Decodes COM error codes thrown by ProSysLib into enumerated values of type PSLException.")]
	HRESULT DecodeException([in] HRESULT ErrorCode, [out, retval] enum PSLException * pValue);
};

[
	uuid(PSL_TypeLib),
	version(PSL_Version),
	helpstring(PSL_TLName),
	helpfile("ProSysLib.chm")
]
library ProSysLib
{
	enum PSLException;
	enum PSLProcessPriority;
	enum PSLThreadPriority;
	enum PSLNamedType;
	enum PSLEnumUserType;
	enum PSLImpersonationLevel;
	enum PSLFilterFlag;
	enum PSLIPv4Format;
	enum PSLIPv6Format;
	enum PSLOSMainVersion;
	enum PSLOSSuitMask;
	enum PSLSpecialFolder;
	enum PSLServiceState;
	enum PSLServiceType;
	enum PSLDriverType;
	enum PSLDriverStartType;
	enum PSLServiceStartType;

	importlib("stdole2.tlb");
	[
		uuid(PSL_ClassID),
		helpstring("Root namespace of the library, contains all the other namespaces, and is the only interface that a client application creates.")
	]
	coclass PSLSystem
	{
		[default] interface IPSLSystem;
	};
	[
		uuid(4CB39229-05C7-40BD-AF16-0902905D2116),
		helpstring("Namespace for all information about hardware on the PC.")
	]
	coclass PSLHardware
	{
		[default] interface IPSLHardware;
	};
	[
		uuid(E15B4E0B-A507-4560-A342-0A159DCAA9CF),
		helpstring("Namespace for all information about software on the PC.")
	]
	coclass PSLSoftware
	{
		[default] interface IPSLSoftware;
	};
	[
		uuid(049B3231-BCC2-4B9C-B79F-AB8868E71DAD),
		helpstring("Namespace for all network information on the PC.")
	]
	coclass PSLNetwork
	{
		[default] interface IPSLNetwork;
	};
	[
		uuid(BAA2E770-B7DA-4360-AA88-1300765C8335),
		helpstring("Description of a single process running in the system.")
	]
	coclass PSLProcess
	{
		[default] interface IPSLProcess;
	};
	[
		uuid(34445082-FC8B-499D-A62E-EE5E032CAB92),
		helpstring("Namespace for accessing security information about the system itself or relevant to the current Process/User.")
	]
	coclass PSLSecurity
	{
		[default] interface IPSLSecurity;
	};
	[
		uuid(8646C519-1B3D-4C00-95DE-ACEE3E02556D),
		helpstring("Information about currently logged in user in the system.")
	]
	coclass PSLUser
	{
		[default] interface IPSLUser;
	};
	[
		uuid(857CDFBB-BADC-4815-B7C5-ADA6C03046DB),
		helpstring("All information about the Operational System.")
	]
	coclass PSLOS
	{
		[default] interface IPSLOS;
	};

	[
		uuid(579364F2-4356-41D1-9BC1-1C75A55FF3B7),
		helpstring("Collection of drivers installed in the system.")
	]
	coclass PSLDrivers
	{
		[default] interface IPSLDrivers;
	};
	[
		uuid(D29C0CEC-32E4-4374-B0A4-7950A5A4DF45),
		helpstring("Describes one particular driver installed in the system.")
	]
	coclass PSLDriver
	{
		[default] interface IPSLDriver;
	};
	[
		uuid(39FCA76A-30F8-425A-975E-BAD96E0D357E),
		helpstring("Information about the CPU.")
	]
	coclass PSLProcessor
	{
		[default] interface IPSLProcessor;
	};
	[
		uuid(8B44848B-0515-4D76-81AA-937AD12F7347),
		helpstring("List of CPU cores detected in the system.")
	]
	coclass PSLCores
	{
		[default] interface IPSLCores;
	};
	[
		uuid(C9573A44-0D2D-4BC9-A319-9CD7C0F2366F),
		helpstring("Information about one particular CPU core.")
	]
	coclass PSLCore
	{
		[default] interface IPSLCore;
	};
	[
		uuid(8F727730-3087-4D33-9833-6C015A0CBE69),
		helpstring("Collection of all User Accounts in the system.")
	]
	coclass PSLAccounts
	{
		[default] interface IPSLAccounts;
	};
	[
		uuid(135DC59D-6A82-4375-9F42-A546C3594E78),
		helpstring("Information about one particular user account.")
	]
	coclass PSLAccount
	{
		[default] interface IPSLAccount;
	};
	[
		uuid(B90E039B-9807-49A7-B4E1-489A9473D2E2),
		helpstring("Complete information about status of the PC memory.")
	]
	coclass PSLMemory
	{
		[default] interface IPSLMemory;
	};
	[
		uuid(16C29DF1-5940-4EBC-8D49-54253BA3A641),
		helpstring("Collection of all privileges available within the current process.")
	]
	coclass PSLPrivileges
	{
		[default] interface IPSLPrivileges;
	};
	[
		uuid(0287BAA5-E8BB-4B0B-81B5-AACDEE096FF6),
		helpstring("Describes a single privilege object within the current process.")
	]
	coclass PSLPrivilege
	{
		[default] interface IPSLPrivilege;
	};
	[
		uuid(841CDF79-381E-4A12-9134-9D71C72862AA),
		helpstring("Collection of processes running in the system.")
	]
	coclass PSLProcesses
	{
		[default] interface IPSLProcesses;
	};
	[
		uuid(196F551D-1F3C-4C40-A260-609B89784B98),
		helpstring("Namespace for all information related to the current process.")
	]
	coclass PSLCurrentProcess
	{
		[default] interface IPSLCurrentProcess;
	};
	[
		uuid(F5F662F1-46C8-4350-B63D-071A1412A36D),
		helpstring("Collection of Services currently installed in the system.")
	]
	coclass PSLServices
	{
		[default] interface IPSLServices;
	};
	[
		uuid(9F03E07D-E65C-40A4-B450-DAD961D624D9),
		helpstring("Description of one particular Service installed in the system.")
	]
	coclass PSLService
	{
		[default] interface IPSLService;
	};
	[
		uuid(0C3A77E9-C95B-49C2-AB78-F22B27B9DC24),
		helpstring("Describes one particular Window that belongs to the current process.")
	]
	coclass PSLWindow
	{
		[default] interface IPSLWindow;
	};
	[
		uuid(DC2572F2-72DE-4095-AA76-957AFE12CA5E),
		helpstring("Collection of all Windows created by the current process.")
	]
	coclass PSLWindows
	{
		[default] interface IPSLWindows;
	};
	[
		uuid(AB2D6A30-7FEE-485C-ADD2-CC7B72B05951),
		helpstring("Describes one particular Thread that belongs to the current process.")
	]
	coclass PSLThread
	{
		[default] interface IPSLThread;
	};
	[
		uuid(0D79412A-9BB1-405B-884E-AC2238F8C0B3),
		helpstring("Collection of all Threads created by the current process.")
	]
	coclass PSLThreads
	{
		[default] interface IPSLThreads;
	};
	[
		uuid(0F5C1033-E6CF-4795-97D9-18C0F825449F),
		helpstring("Namespace for all auxiliary tools/utilities implemented within the library.")
	]
	coclass PSLTools
	{
		[default] interface IPSLTools;
	};
	[
		uuid(E7269BC2-B458-461E-9CFB-08F90385CDBC),
		helpstring("Windows Management Instrumentation namespace.")
	]
	coclass PSLWMI
	{
		[default] interface IPSLWMI;
	};
	[
		uuid(66615179-6B0F-4A41-8054-DA37281FA6A6),
		helpstring("Abstract table of data presented in a form for simplified access.")
	]
	coclass PSLTable
	{
		[default] interface IPSLTable;
	};
	[
		uuid(689AA8AE-B067-43CB-8B33-6E7B7F35D783),
		helpstring("Information about the Version resource in a module.")
	]
	coclass PSLModuleVersion
	{
		[default] interface IPSLModuleVersion;
	};
	[
		uuid(3E2EE412-FA9D-4781-82A1-99E2A58030FF),
		helpstring("Detailed presentation of a version number.")
	]
	coclass PSLVersionNumber
	{
		[default] interface IPSLVersionNumber;
	};
	[
		uuid(E8FF2653-47FE-4880-B976-C4CE8A69D36E),
		helpstring("Collection of command-line parameters for the current process.")
	]
	coclass PSLCmdParams
	{
		[default] interface IPSLCmdParams;
	};
	[
		uuid(0E69CA2A-DABA-4795-B864-05ED4EB0496C),
		helpstring("Single command from the command line of the current process.")
	]
	coclass PSLCmdParam
	{
		[default] interface IPSLCmdParam;
	};
	[
		uuid(BC8D4DD6-EDC8-444D-A6BB-618E0F778E33),
		helpstring("Set of filters for windows enumeration.")
	]
	coclass PSLWindowsFilter
	{
		[default] interface IPSLWindowsFilter;
	};
	[
		uuid(C6942A4E-7888-4A9B-880C-5FF932C4B486),
		helpstring("Information about memory usage by a process.")
	]
	coclass PSLProcessMemory
	{
		[default] interface IPSLProcessMemory;
	};
	[
		uuid(059DA593-31AE-4A9C-8FEB-FC19AD10B71B),
		helpstring("Information about Inputs and Outputs for the current process.")
	]
	coclass PSLProcessIO
	{
		[default] interface IPSLProcessIO;
	};
	[
		uuid(2B4AB75E-3127-4B32-907D-29E43BAAA8DA),
		helpstring("Collection of environment variables in the current process.")
	]
	coclass PSLEnvironmentVars
	{
		[default] interface IPSLEnvironmentVars;
	};
	[
		uuid(FFE41625-54BE-4CBE-A263-5F6CC951FE91),
		helpstring("Represents one environment variable in the current process.")
	]
	coclass PSLEnvironmentVar
	{
		[default] interface IPSLEnvironmentVar;
	};
	[
		uuid(5901F434-31D5-4C21-BE3F-1E5558EA161C),
		helpstring("Represents a single DLL module.")
	]
	coclass PSLModule
	{
		[default] interface IPSLModule;
	};
	[
		uuid(76B704EC-4807-4986-896D-59ED7A8B63F4),
		helpstring("Collection of DLL modules.")
	]
	coclass PSLModules
	{
		[default] interface IPSLModules;
	};
	[
		uuid(67C083E5-8DF0-4B2A-BCEB-C7AB511B46EA),
		helpstring("IPv4 Address.")
	]
	coclass PSLIPv4
	{
		[default] interface IPSLIPv4;
	};
	[
		uuid(A06E9CED-3A70-4091-A742-8A800D7CC62A),
		helpstring("IPv6 Address.")
	]
	coclass PSLIPv6
	{
		[default] interface IPSLIPv6;
	};
	[
		uuid(9075A9AA-302D-46E5-9A44-382552E1F7BF),
		helpstring("Full information about version of the operational system.")
	]
	coclass PSLOSVersion
	{
		[default] interface IPSLOSVersion;
	};
	[
		uuid(37C24A8C-457A-40B2-8C5E-EBF059FE14B7),
		helpstring("Information about a single display monitor in the system.")
	]
	coclass PSLMonitor
	{
		[default] interface IPSLMonitor;
	};
	[
		uuid(C1D8E05E-58F1-4BB5-838D-AE56D7447781),
		helpstring("Collection of display monitors available in the system.")
	]
	coclass PSLMonitors
	{
		[default] interface IPSLMonitors;
	};
	[
		uuid(2C3BCF2D-32AA-42B2-B09E-9B6DA256A571),
		helpstring("Defines the coordinates of the upper-left and lower-right corners of a rectangle.")
	]
	coclass PSLRect
	{
		[default] interface IPSLRect;
	};
	[
		uuid(1C6144AF-0415-4C0C-B256-AAFF40C6E074),
		helpstring("Dimension of an abstract rectangle object.")
	]
	coclass PSLSize
	{
		[default] interface IPSLSize;
	};
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Sibedge IT
Ireland Ireland
My online CV: cv.vitalytomilov.com

Comments and Discussions