Can someone tell me how to use SetupDiGetDeviceRegistryProperty to get
the port number for the parallel port device(0x378)?? I tried by first
calling SetupDiGetClassDevs to get a handle to a device information
set and then calling SetupDiEnumDeviceInfo with this handle. But I am
not sure which property to pass the third parameter to
SetupDiGetDeviceRegistryProperty. I tried with SPDRP_BUSNUMBER and
SPDRP_ADDRESS but it returned error 13 ("Data is invalid"). Any
thoughts?
My code:
HDEVINFO handle= SetupDiGetClassDevs(&GUID_DEVCLASS_PORTS,
NULL,
NULL,
DIGCF_PRESENT);
DevInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
SetupDiEnumDeviceInfo(handle, MemberIndex,&DevInfoData);
SetupDiGetDeviceRegistryProperty(handle,
&DevInfoData,
SPDRP_ADDRESS ,
&dwRegType,
(BYTE*) buffer,
sizeof(buffer),
NULL);
Raghavan
I noticed that the port base address is not present as a registry key.
If then I cant use SetupDiGetDeviceRegistryProperty to get the port
address, is there any other method that I can use?
Thanks
Raghavan
what you mean i guess is the I/O Port. What you now
have to do is to take a look at the devcon sample included
in the DDK/WDK. There you will see how you can get this
Information,...
[DevCon]
http://msdn.microsoft.com/en-us/library/ms792824.aspx
regards
Kerem
--
--
-----------------------
Beste Gr�sse / Best regards / Votre bien devoue
Kerem G�mr�kc�
Latest Project: http://www.pro-it-education.de/software/deviceremover
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
"Raghavan" <ragha...@gmail.com> schrieb im Newsbeitrag
news:8407208d-b156-49e4...@i28g2000prd.googlegroups.com...
d
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Raghavan" <ragha...@gmail.com> wrote in message
news:f455cf4d-0166-4206...@r31g2000prh.googlegroups.com...
Thanks a lot! I tried it with the devcon methods and it works fine.
Raghavan
I needed to display it in the app that I was changing (earlier a
deprecated API was used to get this info). I got it through
CM_Get_First_Log_Conf as done in the devcon sample. Now is it possible
for me to use it to read/write to the port?
Thanks,
Raghavan