Hi,

This one seems to work but i'm not sure that the result is correct :

winspool: load/library %winspool.drv
hprinter: make struct! [address [char*]][""]
openprinter: make routine! compose/deep [
    "Open Printer"
    pprintername [string!]
    phprinter [struct! [(first hprinter)]]
    pdefault [integer!]
    return: [integer!]
] winspool "OpenPrinterA"

ret: openprinter "Canon Bubble-Jet BJC-4300" hprinter 0

?? ret
print ["Handle =" to-integer to-issue enbase/base hprinter/address 16]


-DocKimbel.

Bohdan or Rosemary Lechnowsky wrote:
> 
> OK, %winspool.drv is the correct library to use.  Thanks!  But now I have
> other problems.  Hopefully some of you familiar with C and the library
> component of View/Pro will be able to help.  Continuing from what I had in
> my original message (contained below):
> 
>  >> openprinter: make routine! ["Open Printer" pprintername [string!]
> phprinter [char*] pdefault [string!] return: [integer!]]
> winspool "OpenPrinterA"
>  >> hprinter: copy ""
> == ""
> 
> ;hprinter is the handle that should be returned by 'openprinter above if I
> understand how 'openprinter works.
> 
>  >> ret: openprinter "Brother MFC3100C" hprinter ""
> == 1
> 
> ;Great!  'openprinter returned 1 which indicates it worked!
> 
>  >> hprinter
> == ""
> 
> ;Shouldn't 'hprinter now have some value that indicates the pointer?  I've
> also tried specifying 'phprinter above as LONG, but that didn't do it either
> ;Let's retrieve Windows' error code to see if there was an error
[...]
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to