'=========================================================================== ' Subject: GET NAME OF DEFAULT PRINTER Date: 01-13-99 (20:15) ' Author: Dave Navarro, Jr. Code: PBCC ' Origin: dave@powerbasic.com Packet: PBCC.ABC '=========================================================================== 'Print the name of the default printer from PB/CC $INCLUDE "WIN32API.INC" FUNCTION DefaultPrinter() AS STRING DIM buffer AS ASCIIZ * 128 GetProfileString "WINDOWS", "DEVICE", "", buffer, 127 FUNCTION = buffer END FUNCTION FUNCTION PbMain() AS LONG STDOUT "The default printer is " & CHR$(34) & DefaultPrinter & CHR$(34) END FUNCTION