With the help of OpenPrinter...
You also need the PRINTER_DEFAULT, the DEVMODE structures and also the CCHDEVICENAME and the CCHFORMNAME constants plus an access constant like PRINTER_ACCESS_USE or PINTER_ACCESS_ADMINISTER.
You'll find all of the above in the API Viewer...

Look the rest up in the MSDN library...

Best regards