www.pudn.com > ComputerInformation.zip > SystemInfo.idl


// Disclaimer and Copyright Information 
// SystemInfo.idl : IDL source for SystemInfo.dll 
// 
// All rights reserved. 
// 
// Written by Naveen K Kohli (naveenkohli@netzero.net) 
// Version 1.0 
// 
// Distribute freely, except: don't remove my name from the source or 
// documentation (don't take credit for my work), mark your changes (don't 
// get me blamed for your possible bugs), don't alter or remove this 
// notice. 
// No warrantee of any kind, express or implied, is included with this 
// software; use at your own risk, responsibility for damages (if any) to 
// anyone resulting from the use of this software rests entirely with the 
// user. 
// 
// Send bug reports, bug fixes, enhancements, requests, flames, etc. to 
// naveenkohli@netzero.net 
/////////////////////////////////////////////////////////////////////////////// 
//  
 
// This file will be processed by the MIDL tool to 
// produce the type library (SystemInfo.tlb) and marshalling code. 
 
// Revision History: 
//	2/1/2001	Initial Creation 
//	2/7/2001	Added new method from IMiscInformation2 interface 
//	2/26/2001	Added support for PnP device info Interfaces. 
 
import "oaidl.idl"; 
import "ocidl.idl"; 
 
	[ 
		object, 
		uuid(3039ADAC-C360-11D2-8C68-000000000000), 
		dual, 
		helpstring("ISystemInformation Interface"), 
		pointer_default(unique) 
	] 
	interface ISystemInformation : IDispatch 
	{ 
		[helpstring("method GetOSInformation")] HRESULT GetOSInformation(BSTR *pbstrPlatform, BSTR *pbstrSuites, BSTR *pbstrMinorVersion, BSTR *pbstrServicePack, long *plBuildNumber); 
		[helpstring("method GetMouseInformation")] HRESULT GetMouseInformation([out] VARIANT_BOOL *pbInstalled, [out] VARIANT_BOOL *pbButtonsSwapped, [out] long *plSpeed); 
		[helpstring("method GetCPUInformation")] HRESULT GetCPUInformation([out] BSTR *pbstrVendor, [out] BSTR *pbstrType, [out] BSTR *pbstrArchitecture, [out] BSTR *pbstrLevel, [out] BSTR *pbstrRevision, [out] long *plNumberOfProcessors, [out] long *plSpeed, [out] long *plPageSize, [out] long *plMask); 
		[helpstring("method GetHDiskInformation")] HRESULT GetHDiskInformation(long *plNumberOfPartitions, VARIANT *pbstrDriveLetterArr, VARIANT *pbBootableArr, VARIANT *pbstrTypeArr, VARIANT *plPartitionNumberArr, VARIANT *plLengthArr, VARIANT *plHiddenSectorsArr); 
		[helpstring("method GetMemoryInformation")] HRESULT GetMemoryInformation([out] long *plRAMInstalled, [out] long *plAvailableMemory, [out] long *plVirtualMemory, [out] long *plMemoryLoad); 
		[helpstring("method GetStorageMediaInformation")] HRESULT GetStorageMediaInformation([out] long *plNumberOfDrives, [out] VARIANT *pbReadyArr,  [out] VARIANT *pbstrDriveLetterArr, [out] VARIANT *pbstrLabelArr, [out] VARIANT *pbSupportLongNameArr, [out] VARIANT *pbstrFileSystemArr, [out] VARIANT *pbstrMediaTypeArr, [out] VARIANT *plTotalSpaceArr, [out] VARIANT *plFreeSpaceUserArr, [out] VARIANT *plFreeSpaceTotalArr); 
		[helpstring("method GetMultiMediaInformation")] HRESULT GetMultiMediaInformation([out] VARIANT_BOOL *pbIsInstalled, [out] VARIANT_BOOL *pbHasVolCtrl, [out] VARIANT_BOOL *pbHasSeparateLRVolCtrl, [out] BSTR *pbstrProductName, [out] BSTR *pbstrCompanyName); 
		[helpstring("method GetSystemName")] HRESULT GetSystemName([out] BSTR *pbstrComputerName); 
		[helpstring("method GetSystemUserName")] HRESULT GetSystemUserName([out] BSTR *pbstrUserName); 
		[helpstring("method GelLocalLanguage")] HRESULT GetLocalLanguage([out] BSTR *pbstrLocalLanguage); 
		[helpstring("method GetProtectedFilesInfo")] HRESULT GetProtectedFilesInfo([out]long *plNumOfFiles, [out] VARIANT *pbstrFileNameArr); 
		[helpstring("method GetHWDevicesInfo")] HRESULT GetHWDevicesInfo(void); 
	}; 
 
	[ 
		object, 
		uuid(0C3443D5-0FAB-4a38-A5D0-823CF7885CB2), 
		dual, 
		helpstring("ISystemInformation2 Interface"), 
		pointer_default(unique) 
	] 
	interface ISystemInformation2 : IDispatch 
	{ 
		[helpstring("method GetOSInformation")] HRESULT GetOSInformation(BSTR *pbstrPlatform, BSTR *pbstrSuites, BSTR *pbstrMinorVersion, BSTR *pbstrServicePack, long *plBuildNumber); 
		[helpstring("method GetMouseInformation")] HRESULT GetMouseInformation([out] VARIANT_BOOL *pbInstalled, [out] VARIANT_BOOL *pbButtonsSwapped, [out] long *plSpeed); 
		[helpstring("method GetCPUInformation")] HRESULT GetCPUInformation([out] BSTR *pbstrVendor, [out] BSTR *pbstrType, [out] BSTR *pbstrArchitecture, [out] BSTR *pbstrLevel, [out] BSTR *pbstrRevision, [out] long *plNumberOfProcessors, [out] long *plSpeed, [out] long *plPageSize, [out] long *plMask); 
		[helpstring("method GetHDiskInformation")] HRESULT GetHDiskInformation(long *plNumberOfPartitions, VARIANT *pbstrDriveLetterArr, VARIANT *pbBootableArr, VARIANT *pbstrTypeArr, VARIANT *plPartitionNumberArr, VARIANT *plLengthArr, VARIANT *plHiddenSectorsArr); 
		[helpstring("method GetMemoryInformation")] HRESULT GetMemoryInformation([out] long *plRAMInstalled, [out] long *plAvailableMemory, [out] long *plVirtualMemory, [out] long *plMemoryLoad); 
		[helpstring("method GetStorageMediaInformation")] HRESULT GetStorageMediaInformation([out] long *plNumberOfDrives, [out] VARIANT *pbReadyArr,  [out] VARIANT *pbstrDriveLetterArr, [out] VARIANT *pbstrLabelArr, [out] VARIANT *pbSupportLongNameArr, [out] VARIANT *pbstrFileSystemArr, [out] VARIANT *pbstrMediaTypeArr, [out] VARIANT *plTotalSpaceArr, [out] VARIANT *plFreeSpaceUserArr, [out] VARIANT *plFreeSpaceTotalArr); 
		[helpstring("method GetMultiMediaInformation")] HRESULT GetMultiMediaInformation([out] VARIANT_BOOL *pbIsInstalled, [out] VARIANT_BOOL *pbHasVolCtrl, [out] VARIANT_BOOL *pbHasSeparateLRVolCtrl, [out] BSTR *pbstrProductName, [out] BSTR *pbstrCompanyName); 
		[helpstring("method GetSystemName")] HRESULT GetSystemName([out] BSTR *pbstrComputerName); 
		[helpstring("method GetSystemUserName")] HRESULT GetSystemUserName([out] BSTR *pbstrUserName); 
		[helpstring("method GelLocalLanguage")] HRESULT GetLocalLanguage([out] BSTR *pbstrLocalLanguage); 
		[helpstring("method GetProtectedFilesInfo")] HRESULT GetProtectedFilesInfo([out]long *plNumOfFiles, [out] VARIANT *pbstrFileNameArr); 
		[helpstring("method GetHWDevicesInfo")] HRESULT GetHWDevicesInfo(void); 
		// New Methods & properties for ISystemInformation2 
		[helpstring("method GelLocalLanguage")] HRESULT GetTimeZone([out] BSTR *TimeZone); 
		[helpstring("method GetNetworkInfo")] HRESULT GetNetworkInfo(void); 
		[helpstring("method GetModemInfo")] HRESULT GetModemInfo(void); 
		[helpstring("method GetLocaleInfo")] HRESULT GetLocaleInformation([out] short* CodePage, 
			[out] short* OEMCodePage, [out] BSTR* CalendarType, [out] BSTR* DateFormat, 
			[out] BSTR* Language, [out] BSTR* Country, [out] short* CountryCode, 
			[out] BSTR* TimeFormat, [out] BSTR* Currency, [out] BSTR* TimeFormatSpecifier); 
	}; 
 
	[ 
		object, 
		uuid(51999C83-63A1-46b8-B2FC-3BCB96FC58AB), 
		dual, 
		helpstring("ISystemInformation3 Interface"), 
		pointer_default(unique) 
	] 
	interface ISystemInformation3 : IDispatch 
	{ 
		[helpstring("method GetOSInformation")] HRESULT GetOSInformation(BSTR *pbstrPlatform, BSTR *pbstrSuites, BSTR *pbstrMinorVersion, BSTR *pbstrServicePack, long *plBuildNumber); 
		[helpstring("method GetMouseInformation")] HRESULT GetMouseInformation([out] VARIANT_BOOL *pbInstalled, [out] VARIANT_BOOL *pbButtonsSwapped, [out] long *plSpeed); 
		[helpstring("method GetCPUInformation")] HRESULT GetCPUInformation([out] BSTR *pbstrVendor, [out] BSTR *pbstrType, [out] BSTR *pbstrArchitecture, [out] BSTR *pbstrLevel, [out] BSTR *pbstrRevision, [out] long *plNumberOfProcessors, [out] long *plSpeed, [out] long *plPageSize, [out] long *plMask); 
		[helpstring("method GetHDiskInformation")] HRESULT GetHDiskInformation(long *plNumberOfPartitions, VARIANT *pbstrDriveLetterArr, VARIANT *pbBootableArr, VARIANT *pbstrTypeArr, VARIANT *plPartitionNumberArr, VARIANT *plLengthArr, VARIANT *plHiddenSectorsArr); 
		[helpstring("method GetMemoryInformation")] HRESULT GetMemoryInformation([out] long *plRAMInstalled, [out] long *plAvailableMemory, [out] long *plVirtualMemory, [out] long *plMemoryLoad); 
		[helpstring("method GetStorageMediaInformation")] HRESULT GetStorageMediaInformation([out] long *plNumberOfDrives, [out] VARIANT *pbReadyArr,  [out] VARIANT *pbstrDriveLetterArr, [out] VARIANT *pbstrLabelArr, [out] VARIANT *pbSupportLongNameArr, [out] VARIANT *pbstrFileSystemArr, [out] VARIANT *pbstrMediaTypeArr, [out] VARIANT *plTotalSpaceArr, [out] VARIANT *plFreeSpaceUserArr, [out] VARIANT *plFreeSpaceTotalArr); 
		[helpstring("method GetMultiMediaInformation")] HRESULT GetMultiMediaInformation([out] VARIANT_BOOL *pbIsInstalled, [out] VARIANT_BOOL *pbHasVolCtrl, [out] VARIANT_BOOL *pbHasSeparateLRVolCtrl, [out] BSTR *pbstrProductName, [out] BSTR *pbstrCompanyName); 
		[helpstring("method GetSystemName")] HRESULT GetSystemName([out] BSTR *pbstrComputerName); 
		[helpstring("method GetSystemUserName")] HRESULT GetSystemUserName([out] BSTR *pbstrUserName); 
		[helpstring("method GelLocalLanguage")] HRESULT GetLocalLanguage([out] BSTR *pbstrLocalLanguage); 
		[helpstring("method GetProtectedFilesInfo")] HRESULT GetProtectedFilesInfo([out]long *plNumOfFiles, [out] VARIANT *pbstrFileNameArr); 
		[helpstring("method GetHWDevicesInfo")] HRESULT GetHWDevicesInfo(void); 
		// New Methods & properties 
		[helpstring("method GelLocalLanguage")] HRESULT GetTimeZone([out] BSTR *TimeZone); 
		[helpstring("method GetNetworkInfo")] HRESULT GetNetworkInfo(void); 
		[helpstring("method GetModemInfo")] HRESULT GetModemInfo(void); 
		[helpstring("method GetLocaleInfo")] HRESULT GetLocaleInformation([out] short* CodePage, 
			[out] short* OEMCodePage, [out] BSTR* CalendarType, [out] BSTR* DateFormat, 
			[out] BSTR* Language, [out] BSTR* Country, [out] short* CountryCode, 
			[out] BSTR* TimeFormat, [out] BSTR* Currency, [out] BSTR* TimeFormatSpecifier); 
 
		// Methods for ISystemInformation3 interface. 
		[helpstring("Gel PnP Devices List")] HRESULT GetPnPDevices([out] IUnknown** PnPDevices); 
	}; 
 
	[ 
		object, 
		uuid(1017B4E5-88F8-4308-B20E-3C79D22EB7EA), 
		dual, 
		helpstring("ISystemInformation3 Interface"), 
		pointer_default(unique) 
	] 
	interface ISystemInformation4 : IDispatch 
	{ 
		[helpstring("method GetOSInformation")] HRESULT GetOSInformation(BSTR *pbstrPlatform, BSTR *pbstrSuites, BSTR *pbstrMinorVersion, BSTR *pbstrServicePack, long *plBuildNumber); 
		[helpstring("method GetMouseInformation")] HRESULT GetMouseInformation([out] VARIANT_BOOL *pbInstalled, [out] VARIANT_BOOL *pbButtonsSwapped, [out] long *plSpeed); 
		[helpstring("method GetCPUInformation")] HRESULT GetCPUInformation([out] BSTR *pbstrVendor, [out] BSTR *pbstrType, [out] BSTR *pbstrArchitecture, [out] BSTR *pbstrLevel, [out] BSTR *pbstrRevision, [out] long *plNumberOfProcessors, [out] long *plSpeed, [out] long *plPageSize, [out] long *plMask); 
		[helpstring("method GetHDiskInformation")] HRESULT GetHDiskInformation(long *plNumberOfPartitions, VARIANT *pbstrDriveLetterArr, VARIANT *pbBootableArr, VARIANT *pbstrTypeArr, VARIANT *plPartitionNumberArr, VARIANT *plLengthArr, VARIANT *plHiddenSectorsArr); 
		[helpstring("method GetMemoryInformation")] HRESULT GetMemoryInformation([out] long *plRAMInstalled, [out] long *plAvailableMemory, [out] long *plVirtualMemory, [out] long *plMemoryLoad); 
		[helpstring("method GetStorageMediaInformation")] HRESULT GetStorageMediaInformation([out] long *plNumberOfDrives, [out] VARIANT *pbReadyArr,  [out] VARIANT *pbstrDriveLetterArr, [out] VARIANT *pbstrLabelArr, [out] VARIANT *pbSupportLongNameArr, [out] VARIANT *pbstrFileSystemArr, [out] VARIANT *pbstrMediaTypeArr, [out] VARIANT *plTotalSpaceArr, [out] VARIANT *plFreeSpaceUserArr, [out] VARIANT *plFreeSpaceTotalArr); 
		[helpstring("method GetMultiMediaInformation")] HRESULT GetMultiMediaInformation([out] VARIANT_BOOL *pbIsInstalled, [out] VARIANT_BOOL *pbHasVolCtrl, [out] VARIANT_BOOL *pbHasSeparateLRVolCtrl, [out] BSTR *pbstrProductName, [out] BSTR *pbstrCompanyName); 
		[helpstring("method GetSystemName")] HRESULT GetSystemName([out] BSTR *pbstrComputerName); 
		[helpstring("method GetSystemUserName")] HRESULT GetSystemUserName([out] BSTR *pbstrUserName); 
		[helpstring("method GelLocalLanguage")] HRESULT GetLocalLanguage([out] BSTR *pbstrLocalLanguage); 
		[helpstring("method GetProtectedFilesInfo")] HRESULT GetProtectedFilesInfo([out]long *plNumOfFiles, [out] VARIANT *pbstrFileNameArr); 
		[helpstring("method GetHWDevicesInfo")] HRESULT GetHWDevicesInfo(void); 
		// New Methods & properties 
		[helpstring("method GelLocalLanguage")] HRESULT GetTimeZone([out] BSTR *TimeZone); 
		[helpstring("method GetNetworkInfo")] HRESULT GetNetworkInfo(void); 
		[helpstring("method GetModemInfo")] HRESULT GetModemInfo(void); 
		[helpstring("method GetLocaleInfo")] HRESULT GetLocaleInformation([out] short* CodePage, 
			[out] short* OEMCodePage, [out] BSTR* CalendarType, [out] BSTR* DateFormat, 
			[out] BSTR* Language, [out] BSTR* Country, [out] short* CountryCode, 
			[out] BSTR* TimeFormat, [out] BSTR* Currency, [out] BSTR* TimeFormatSpecifier); 
 
		// Methods for ISystemInformation3 interface. 
		[helpstring("Gel PnP Devices List")] HRESULT GetPnPDevices([out] IUnknown** PnPDevices); 
 
		// Methods for ISystemInformation4 interface 
		[helpstring("method GetKeyboardInfo")] HRESULT GetKeyboardInfo([out]BSTR* KeyboardType, [out]short *FnKeys); 
	}; 
 
[ 
	uuid(3039ADA0-C360-11D2-8C68-000000000000), 
	version(1.1), 
	helpstring("SystemInfo 1.1 Type Library") 
] 
library SYSTEMINFOLib 
{ 
	importlib("stdole32.tlb"); 
	importlib("stdole2.tlb"); 
 
	[ 
		uuid(3039ADAD-C360-11D2-8C68-000000000000), 
		helpstring("SystemInformation Class") 
	] 
	coclass SystemInformation 
	{ 
		[default] interface ISystemInformation; 
		interface ISystemInformation2; 
		interface ISystemInformation3; 
		interface ISystemInformation4; 
	}; 
};