access violation when try Hardware Detection Demo

From: Anna (de_4nna_at_yahoo.com)
Date: 10/29/03


Date: 28 Oct 2003 22:42:07 -0700


Hi,
I get Exception Access violation at address 0000000 when i try to running Hardware Detection Demo, this error at line 134 in code:
pDevInfo:=SetupDiGetClassDevs( nil, nil, 0, DIGCF_PRESENT or DIGCF_ALLCLASSES);

I try a simple application with setupapi function, i get exception access violation too.

How do i fix this error?

I use Delphi 5, OS win2000, and setupapi.pas
(download from http://www.delphi-gems.com/controls.php)
sorry for my English.

TIA
-Anna-