Alaska Software Inc. - XBPPrinter:List() strange error
Username: Password:
AuthorTopic: XBPPrinter:List() strange error
Kovary Adam XBPPrinter:List() strange error
on Tue, 07 Dec 2010 14:50:39 +0100
Hi All,

I have a strange error with xbpprinter:list.
Everything works right with the printing, except:
when the windows spooler service is stopped the
List() method kills my program, no error message,
no logs, just disappears my program.
(error handling MsgBox doesnt get called)

Thanks in advance for any help,
Koadam


     bSaveErrorBlock := ErrorBlock( {|e| Break(e)} )

     BEGIN SEQUENCE
       oPrinter := XbpPrinter():New()
       aPrnList := oPrinter:list()  <- kills the program if spooler is stopped
       oPrinter:Create()
     RECOVER USING oError
       MsgBox("something's very wrong here")
     END SEQUENCE

     ErrorBlock(bSaveErrorBlock)
Klemens LichterRe: XBPPrinter:List() strange error
on Wed, 15 Dec 2010 11:21:01 +0100
OK, xbpprinter:list NEEDS the spooler to get the information, without the
spooler it can´t run. But it should noch kill the application, it should
generate an error.
Is there a possibility from within xBase++ to check if a certain service is
running? If so, check if spooler is running befor calling xbprinter:list

Klemens

NEU: Der Online-Shop www.csl.liefert-es.com mit über 40.000 Artikeln. Büro,
Schule, EDV, Tinte, Toner und Vieles mehr. Einfach ausprobieren!
"Kovary Adam" <koadam@freemail.hu> schrieb im Newsbeitrag
news:438c2dbc$697aa21c$d7b8@news.alaska-software.com...
> Hi All,
>
> I have a strange error with xbpprinter:list.
> Everything works right with the printing, except:
> when the windows spooler service is stopped the
> List() method kills my program, no error message,
> no logs, just disappears my program.
> (error handling MsgBox doesnt get called)
>
> Thanks in advance for any help,
> Koadam
>
>
>      bSaveErrorBlock := ErrorBlock( {|e| Break(e)} )
>
>      BEGIN SEQUENCE
>        oPrinter := XbpPrinter():New()
>        aPrnList := oPrinter:list() // <- kills the program if spooler is
stopped
>        oPrinter:Create()
>      RECOVER USING oError
>        MsgBox("something's very wrong here")
>      END SEQUENCE
>
>      ErrorBlock(bSaveErrorBlock)