Re: 用 SetPrinter() 來設定 default printer(編號:4102)

請問在 Windows 98 中如何用 SetPrinter() API 來設定 Default printer 呢?
以下是 MS web site 中找到的一些料 ...
Q140560 - HOWTO: Set the Default Printer Programmatically in Windows 95
To set or change the default printer under Windows 95, call:
SetPrinter(HANDLE hPrinter, DWORD dwLevel, LPBYTE lpbPrinter,
DWORD dwCommand)
Obtain the hPrinter parameter from OpenPrinter() as a handle that identifies the desired printer. Set the dwLevel parameter to 5, and point lpbPrinter to the PRINTER_INFO_5 structure. Set the dwCommand parameter to 0 (zero). Fill out the PRINTER_INFO_5 structure appropriately making sure that the Attributes field has PRINTER_ATTRIBUTE_DEFAULT set.