Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting Hardware Info
Message
 
 
À
03/10/2002 07:30:06
Fabian Belo
Independent Developer
Argentine
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00707248
Message ID:
00707358
Vues:
14
This is code from Hussars team Desktop application (it would be published here soon):
#define HKEY_LOCAL_MACHINE	0x80000002
#define gREGKEYSYSINFO		"SOFTWARE\Microsoft\Shared Tools\MSINFO"
#define gREGVALSYSINFO		"PATH"
#define SW_NORMAL			1

DECLARE LONG ShellExecute IN SHELL32.DLL ;
    LONG nWinHandle, STRING cOperation,;
    STRING cFileName, STRING cParameters,;
    STRING cDirectory, INTEGER nShowWindow

Local lcSysInfoPath

* Try To Get System Info Program Path\Name From Registry...
oReg = NewObject("registry", "libs\registry.prg")
lcSysInfoPath = oReg.ReadRegistryString(HKEY_LOCAL_MACHINE, gREGKEYSYSINFO, gREGVALSYSINFO)

If ShellExecute(0, "open", lcSysInfoPath, "", "", SW_NORMAL) <= 32
	MessageBox("System Information Is Unavailable At This Time")
endif
>Hi everybody.
>I need a function (using API) that returns a list of current system hardware configuration (something like System Properties tab). I have some stuff to retrieve HD & Monitor info reading the registry, but what I really need is a list of everything in ONE API call (if exists):
>
>- Processor (type & speed)
>- Total Physical Memory
>- HDs Drives
>- CDs Drives
>- Monitor (brand & features)
>- OS (this item can be excluded)
>
>I've tried reading HKEY_LOCAL_MACHINE and HKEY_CURRENT_CONFIG but I can't reach the desired results.
>Thank you.
>Note: I know there's a lot ActiveX Controls to do this, but I don't want to use them.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform