Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I determine hardware resources?
Message
From
03/12/2002 12:04:53
 
 
To
03/12/2002 11:49:00
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00729021
Message ID:
00729052
Views:
12
Thanks, David. Yuck. I have 3rd party ActiveX and DLL's to do it easier than that :-) I was just trying to keep this real light in weight and not add another control into the mix for this one piece of info. It is interesting that I can grab anything about the ports with API calls, except those resources.

I am doing this to generate a configuration file for this software on startup of the app. With Plug and Pray, and possible other software using the ports, I would like to grab a quick snapshot of available hardware and go. Guess I'll go Googling .... Thanks again.

>Here is what my registry shows:
>
>REGEDIT4
>
>[HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\MultifunctionAdapter\4\ParallelController\0]
>"Component Information"=hex:40,00,00,00,00,00,00,00,00,00,00,00,ff,ff,ff,ff
>"Identifier"="PARALLEL1"
>"Configuration Data"=hex(9):01,00,00,00,00,00,00,00,00,00,00,00,02,00,00,00,01,\
> 01,01,00,78,03,00,00,00,00,00,00,03,00,00,00,02,00,01,00,07,00,00,00,07,00,\
> 00,00,ff,ff,ff,ff
>
>[HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\MultifunctionAdapter\4\SerialController\0]
>"Component Information"=hex:78,00,00,00,00,00,00,00,00,00,00,00,ff,ff,ff,ff
>"Identifier"="COM1"
>"Configuration Data"=hex(9):01,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,01,\
> 01,01,00,f8,03,00,00,00,00,00,00,07,00,00,00,02,00,01,00,04,00,00,00,04,00,\
> 00,00,ff,ff,ff,ff,05,00,00,00,08,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
> 00,00,20,1c,00
>
>[HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\MultifunctionAdapter\4\SerialController\1]
>"Component Information"=hex:78,00,00,00,00,00,00,00,01,00,00,00,ff,ff,ff,ff
>"Identifier"="COM2"
>"Configuration Data"=hex(9):01,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,01,\
> 01,01,00,f8,02,00,00,00,00,00,00,07,00,00,00,02,00,01,00,03,00,00,00,03,00,\
> 00,00,ff,ff,ff,ff,05,00,00,00,08,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
> 00,00,20,1c,00
>
>--------------
>
>You will notice that Parallel Port 1 shows ... ,78,03, ...
>This could be interpreted as 0378
>
>And the same is true for the serial ports. So, there is a way to decipher this, but it would take time. There has to be an easier way. If all else fails, looking for VB code that can do it and translate it into VFP code.
Previous
Reply
Map
View

Click here to load this message in the networking platform