The extension creates a token {event_registration_barcode.bar} that can be used in message templates of Event Registration mail .
Extract folder to your extension folder and install it. refer to below link: http://wiki.civicrm.org/confluence/display/CRMDOC/Extensions
Add the token 'Event Registration Barcode' to event registration message template which will get replace with barcode generated with currentdate and participant_id in confirmation email.
The 'code 39' type is used to create the Barcode.(The library used is barcodegen http://barcodephp.com).