Skip to main content

Check if logical printer is installed

Author: adkinsl@proware.com (hoss)

I would like it very much if I could check for the existence of a logical printer via proc.

Perhaps something like this....

if ($logicalprinter("HPLASER") = 1) ;--  where 1 exists and 0 does not

   print "HPLASER","C"

endif

 

Check if logical printer is installed

Author: adkinsl@proware.com (hoss)

I would like it very much if I could check for the existence of a logical printer via proc.

Perhaps something like this....

if ($logicalprinter("HPLASER") = 1) ;--  where 1 exists and 0 does not

   print "HPLASER","C"

endif

 

Hi.

You can do it using signatures.

Uniface stores logical printers info into windows registry.

You have to look if a key like this exists:

HKEY_CURRENT_USER\\Software\\Compuware\\Uniface\\USYS9\\PRT_PDF

where USYS9 is your Uniface installation directory and PRT_PDF is your printer name.

Look at ADVAPI32 (windows dll).

 

Bye


Author: ezioze (ezioze@aruba.it)

Check if logical printer is installed

Author: adkinsl@proware.com (hoss)

I would like it very much if I could check for the existence of a logical printer via proc.

Perhaps something like this....

if ($logicalprinter("HPLASER") = 1) ;--  where 1 exists and 0 does not

   print "HPLASER","C"

endif

 

Hi,

Since 9.3 you can use the following to get a list of the PRT_xxx keys under the Uniface USYS9 registry key:

  $1 = $setting("", "[PRT_<gold>*]", "REGKEYS")

This gets you a list of PRT_xxx values, representing all the local printer definitions you have made. You can use all the Uniface list functions to process this list. In case of error, $procerror is -1118 (non-existence of a key is not an error... that gets you an empty list!). Note that $setting is as yet undocumented and unsupported.

Etienne
 

 

 

 

 

 

 

 

 


Author: etienne (etienne_thijsse@compuware.com)