IR Codes are very complex and there are no standards and so this is a very difficult question to answer. Unfortunately IrDa and consumer IR are 2 different things (they operate on different frequencies) and so you will not be able to control your TV with the IrDa port on your computer.
To get your TV to start from the computer, you need an IR Receiver and Sender and software to drive it. There are a large number of these sort of devices, with the best (and cheapest) being the Microsoft MCE remote which can be programmed to do much more than just that. Another popular choice is LIRC (or WinLIRC) which is a free software package that can do this and there are stacks of cheap DIY compatible circuits around.
While on the software front, check out this page:
[Link: byremote.com.au] which is free software for driving remotes (all you need is the hardware to drive it).