how get vendor/device id if i know pci device index/bus/dev?

Hi. I want do my small device enumerator like enum-pci.
How i can get vendor/device id from program?
pseudcode:
pci_attach()
pci_find_class(…CLASS_VGA…) //found

found pci index/bus/dev_no/dev_func.
can i get vendor/device id for this device?
no functions in help found for such task…