I have an exe loaded as a service on NT. Many thanks to the help received from this forum in creating exe's to run as a service.
Now, I need this application to print to the default printer. My application uses the tprinter class and the Fivewin report class.
During the print attempt I receive the following message.
MsgStop( "There are no printers installed!" + CRLF + ;
"Please exit this application and install a printer." )
This comes from the printer.prg (tprinter class) from the following lines of code.
if ::hDC != 0
aOffset := PrnOffset( ::hDC )
::nXOffset := aOffset[1]
::nYOffset := aOffset[2]
::nOrient := ::GetOrientation()
elseif ComDlgXErr() != 0
MsgStop( "There are no printers installed!" + CRLF + ;
"Please exit this application and install a printer." )
::nXOffset := 0
::nYOffset := 0
else
::nXOffset := 0
::nYOffset := 0
::nOrient := DMORIENT_PORTRAIT
endif
My question is, how can I utilize the printer class from an application running as a service? Or, how can I "install" a printer which will be available to services that are running?
Thanks in advance.