Serial comms in Win32 is not particularly well catered for, the API is somewhat cumbersome to use but is dealt with fairly comprehensively in this article on MSDN.
The .Net 2.0 (and later) Framework includes an excellent and easy to use serial communications class that makes the whole process much simpler, but you'll need to use C++/CLI or C# or some other .NET language to access that.
For very simple serial I/O you can always use stdio and simply open the COM*n* device where n is the port number you wish to open. Stdio provides no means to set baud rate and framing etc., but this can easily be achieved by invoking the mode
command via a system call. It is crude and lacks the flexibility of the API level interface, but may be adequate for your needs for a quick-and-dirty solution. For example:
system( "MODE COM1: BAUD=115200 PARITY=n DATA=8 STOP=1" ) ;
FILE port = fopen( "COM1:", "wb" ) ;
fprintf( port, "hello, world!\n" ) ;
fclose( port ) ;