You need to write a Virtual Serial driver, here is Microsoft sample for Kernel mode driver.
Keep in the middle that Windows allocates the COM numbers, depends on the number of ports that you have on your system. COM1 is usually allocated to the onboard serial port.