It should be posssible with the winAPI, although I've never used it for printing so I can't really help you.