Well, if you use ConnectToPrinterDlg function (Windows), it will do it's best to connect to the printer you selected and return a handle to it. After that, I'm guessing the following functions might be helpful. Browsing MSDN and Googling for some examples and tutorials would be a good idea.
buthttp://msdn.microsoft.com/en-us/library/windows/desktop/dd162751(v=vs.85).aspx
AddJob function (Windows)
StartDocPrinter function (Windows)
StartPagePrinter function (Windows)