Click to See Complete Forum and Search --> : How to Get System info....


Jay
March 29th, 1999, 08:39 AM
Hello Gurus...I am in dire need of help. Does anyone know how i can get a list of I/O addresses used by the different hardware installed in the PC? Like the System icon inside the control Panel...it knows which hardware is installed and what I/O address it occupies...i need this same method on getting the hardware installed together with the I/O address they occupy. Thank You very much in advance...and God Bless.


Jay

indika
March 29th, 1999, 08:55 AM
HKEY key;

DWORD type;

BYTE data[256];

DWORD size=256;

if (::RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Shared

Tools\\MSInfo",NULL,KEY_QUERY_VALUE,&key)==ERROR_SUCCESS)

{

if (::RegQueryValueEx(key,"Path",NULL,&type,data,&size)==ERROR_SUCCESS)

{

::RegCloseKey(key);

::ShellExecute(NULL,NULL,(LPTSTR)data,NULL,NULL,SW_SHOWNORMAL);

}

}