Yep. Of course it is possible. :-)
As far as I know there are two ways to generate bar codes:
In response to your updated question about detecting barcode printers:
I think a barcode printer will show up as a regular printer on your system. At least that is how the devices I have played with have worked.
This means that you can detect a specific barcode printer by enumerating the installed printers on the system and looking for the specified device, but in most cases I would suggest that you let the user specify the printer himself using either the standard print dialog or using a custom dialog.