win10,在添加打印打印机时,会弹出对话框显示搜索到的网络打印机(或打印机类型的端口),如下图:
得到电脑的默认打印机 GetDefaultPrinter设置默认打印机 SetDefaultPrinter遍历电脑打印机 EnumPrinters