Printer status

I am printing to a network printer.
Is there any way I can check if the printer is in fact available?

I am using the Printers unit.

When I execute the windows PrintForm.PrintDialog1.Execute(Self.handle), I get a list of printers; Including Network printers which do not exist on the current network. A Refresh does not help.
When I then try to print to this non-existing network printer, the whole application freezes up for up to a minute, after which all comes back, but without any errors, and without any printer spool window.
I have no idea what has now happened to the document.

I cannot afford my app to be in this situation: I need to be sure the printer is in fact available.
How?

Thanks, Bart
0
Bart
4/18/2010 1:25:31 AM
embarcadero.delphi.win32 2183 articles. 0 followers. Follow

15 Replies
3460 Views

Similar Articles

[PageSpeed] 48

Bart Kindt wrote:

> I am printing to a network printer.
> Is there any way I can check if the printer is in fact available?

Not easily, unfortunately. The only way to check is to try to access
the printer. You can do that using the GetPrinter API function from the
WinSpool unit (not to be confused with TPrinter.GetPrinter), but it
will cause the same long timeout before you get a status back. And the
status may not actually tell you anything meaningful.

You can play with the following function

Uses WinSpool;

function GetCurrentPrinterStatus: DWORD;
var
  hPrinter: THandle;
  Device, Driver,Port   : array[0..128] of char;
  hDeviceMode: THandle;
  bytesNeeded: Cardinal;
  pPI: PPrinterInfo2;
  Defaults: TPrinterDefaults;
begin
  Assert( Printer.PrinterIndex >= 0 );
  Printer.GetPrinter(Device, Driver, Port, hDeviceMode);
  FillChar( Defaults, Sizeof(Defaults), 0 );
  Defaults.DesiredAccess:= 
    PRINTER_ACCESS_ADMINISTER or PRINTER_ACCESS_USE;
  Win32Check(WinSpool.OpenPrinter(@Device, hPrinter, @Defaults ));
  try
    WinSpool.GetPrinter(
      hPrinter,
      2,
      Nil, 0, @bytesNeeded );
    GetMem( pPI, bytesNeeded );
    try
      Win32Check(WinSpool.GetPrinter(
        hPrinter, 2,
        pPI, bytesNeeded, @bytesNeeded ));
      Result := pPI^.Status;
    finally
      FreeMem( pPI );
    end;
  finally
    WinSpool.ClosePrinter( hPrinter );
  end;
end;

Check the API docs for PRINTER_INFO_2, it tells you what flags may
appear in  the status returned by this function. You test for the
presence of a specfic flag via an expression like 

   if (Status and PRINTER_STATUS_ERROR) <> 0 then
     ...printer is in an error state

> When I execute the windows
> PrintForm.PrintDialog1.Execute(Self.handle), I get a list of
> printers; Including Network printers which do not exist on the
> current network. 

The dialog enumerates the printers that are defined in the Windows
Printers applet. It does not check whether network printers defined
there are actually available.



-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
0
Peter
4/18/2010 9:07:37 AM
> {quote:title=Peter Below wrote:}
> 
> Not easily, unfortunately. The only way to check is to try to access
> the printer. You can do that using the GetPrinter API function from the
> WinSpool unit (not to be confused with TPrinter.GetPrinter), but it
> will cause the same long timeout before you get a status back.

Thanks again Peter; I will try your example and see if this helps; But it looks like I have to move the whole print routine into a Thread to make sure my application will not hang while it attemps to print.
Even with a working network printer, I have a few seconds where the app is on hold (Wireless LAN), and I cannot afford that.
I am surprised that this is not handled in Windows by Winspool so that the app is released immediately.
Especially when there is no error returned!

Cheers,  Bart
0
Bart
4/18/2010 9:42:26 AM
On Sun, 18 Apr 2010 02:42:26 -0700, Bart Kindt <> wrote:

>> {quote:title=Peter Below wrote:}
>> 
>> Not easily, unfortunately. The only way to check is to try to access
>> the printer. You can do that using the GetPrinter API function from the
>> WinSpool unit (not to be confused with TPrinter.GetPrinter), but it
>> will cause the same long timeout before you get a status back.
>
>Thanks again Peter; I will try your example and see if this helps; But it looks like I have to move the whole print routine into a Thread to make sure my application will not hang while it attemps to print.
>Even with a working network printer, I have a few seconds where the app is on hold (Wireless LAN), and I cannot afford that.
>I am surprised that this is not handled in Windows by Winspool so that the app is released immediately.
>Especially when there is no error returned!
>

Seems to be the braindead way Windows handles the network...
It blindly dives into some deepdown function that will only return
after a minute when the network connection cannot be established.
It is not only doing this for printers, in fact it is everything that
uses the windows SMB protocol. For example drive letter mappings to
server shares....
REALLY bad behaviour because it locks up everything else on the PC as
well during this minute....

--

Bo Berglund
Developer in Sweden
0
Bo
4/18/2010 9:13:26 PM
> {quote:title=Peter Below wrote:}{quote}
> Bart Kindt wrote:
> 
> > I am printing to a network printer.
> > Is there any way I can check if the printer is in fact available?
> 
> Not easily, unfortunately. The only way to check is to try to access
> the printer. You can do that using the GetPrinter API function from the
> WinSpool unit
> 
> You can play with the following function

> function GetCurrentPrinterStatus: DWORD;

Peter, I just tried this, trying a Network printer of which the Computer to which it is connected is Offline:
But I get an Exeption: "System Error 1722: The RPC Server is  unavailable" and the function does not seem to give a result. In fact, the next line in the code is not executed (where I display the Status).

When using a local printer which is not connected to the USB port, the function return zero, and none of the Status messages appear; I would have expected :
if (AStatus and PRINTER_STATUS_OFFLINE) <> 0 then Term('Printer Status OffLine',debug_3);
to have been executed?
Instead: AStatus = 0;

Any ideas?

PS: Windows XP and Delphi 2006.

Thanks,  Bart

Edited by: Bart Kindt on Apr 19, 2010 6:11 PM
0
Bart
4/20/2010 1:12:17 AM
On 2010-04-17 9:25 PM, Bart Kindt wrote:
> I am printing to a network printer.
> Is there any way I can check if the printer is in fact available?

The Win32 APIs called automatically by any form in your application that 
contains a component for printing (such as a reporting or printing 
component) can take up to 60 seconds to initialize themselves when you 
have a printer in your Windows control panel printers-list that is not 
responding.  This is a flaw in the Windows XP printer model, and not the 
only one.  I consider the printing subsystem in XP to be a complete
piece of crap.  I have also experienced similar delays in Vista and
Windows 7.

I have not found any way to be rid of it, other than to remove all 
printers from my control panel list of printers that ever go offline on 
me.   It seems that there are multiple ways of installing printer 
drivers in Windows 7, and that some of the ways that printers can be
installed in Windows 7 are resistant to this "delay" while it figures
out that you don't actually have access to this printer.

My workaround for preventing delays during application startup was to
make sure that the main application form in my apps doesn't contain
any componentry that enumerates printers.  Then the delay moves from
"one minute wait to start my app" to a worst case of "one minute wait 
before I can print my document".  This is bad, but not as bad.

Personally I would like to add some feature that determines what printer
is the problem, and have it marked as offline, since Windows XP itself 
does not itself mark the printers that are not responding as offline.

In other words, Windows is insane here. Your application is working atop
a broken platform.

Warren
0
Warren
4/20/2010 2:20:21 PM
> {quote:title=Warren Postma wrote:}
> The Win32 APIs called automatically by any form in your application that 
> contains a component for printing (such as a reporting or printing 
> component) can take up to 60 seconds to initialize themselves when you 
> have a printer in your Windows control panel printers-list that is not 
> responding. 

Hmm.. But if I would put al my Printer stuff into a seperate Thread, this would keep my app going while Windows sorts out its stuff?  Or does it still lock up while it is loading the API etc?

But, I still need to know, even after a few minutes, if the selected printer is in fact printing!
And currently I do't get _any_ results from printing to an off-line Network printer.

Bart
0
Bart
4/20/2010 3:39:01 PM
Bart Kindt wrote:

> > {quote:title=Peter Below wrote:}{quote}
> > Bart Kindt wrote:
> > 
> > > I am printing to a network printer.
> > > Is there any way I can check if the printer is in fact available?
> > 
> > Not easily, unfortunately. The only way to check is to try to access
> > the printer. You can do that using the GetPrinter API function from
> > the WinSpool unit
> > 
> > You can play with the following function
> 
> > function GetCurrentPrinterStatus: DWORD;
> 
> Peter, I just tried this, trying a Network printer of which the
> Computer to which it is connected is Offline:  But I get an Exeption:
> "System Error 1722: The RPC Server is  unavailable" and the function
> does not seem to give a result. In fact, the next line in the code is
> not executed (where I display the Status).

Well, that is promising then, no? You can trap the exception with a
try--except around the function call. It is probably raised by one of
the Win32Check calls in the code, likely the one for OpenPrinter. If
you rewrite the code to store the return value of OpenPrinter into a
local variable, so you can examine it, you could detect the error
without raising an exception.

> When using a local printer which is not connected to the USB port,
> the function return zero, and none of the Status messages appear; I
> would have expected :  if (AStatus and PRINTER_STATUS_OFFLINE) <> 0
> then Term('Printer Status OffLine',debug_3); to have been executed?
> Instead: AStatus = 0;

That is one of the big problems of the spooler/printer API in Windows.
You are actually reading the last error status seen by the printer
*driver*. The driver only detects a problem when it tries to send a job
to the printer. If you try to print and then check the status
afterwards it will usually get you the correct status. But before that
you get a bogus value.
 
-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
0
Peter
4/20/2010 5:41:55 PM
I have tried Peter's example above.

I now catch the exception 1722  and then convert this into a 'printer not online', which happens on a Netork printer where the remote PC is not online.
However, when I try the 'GetCurrentPrinterStatus' on a local USB printer, which is not plugged in, I get a result of zero, no errors.
When I then try to print to it, the local print spool accepts it, but when opened it shows a Status with an empty field. It also does not seem to have any Status for the printer.

But when I then go into Control panel/Printer and Faxes, there the Status is shown as 'OFFLINE'.
What a mess.

Anybody has any ideas how I can get a Status of a local USB printer??

** Update: 
I just read Peter;s reply to my earlier message; I will try a test page, immediately followed by checking the Status and see what happens...

*** Update 2
Tried this. Now I print a test page to the not-connected printer and do a 'GetCurrentPrinterStatus' immediately after.Result = 0; Job goes into the print spooler, which shows an empty field on Status.
 
Bart

Edited by: Bart Kindt on Apr 20, 2010 1:35 PM

Edited by: Bart Kindt on Apr 20, 2010 1:53 PM
0
Bart
4/20/2010 8:55:51 PM
Bart Kindt wrote:

> I have tried Peter's example above.
> 
> I now catch the exception 1722  and then convert this into a 'printer
> not online', which happens on a Netork printer where the remote PC is
> not online.  However, when I try the 'GetCurrentPrinterStatus' on a
> local USB printer, which is not plugged in, I get a result of zero,
> no errors.  When I then try to print to it, the local print spool
> accepts it, but when opened it shows a Status with an empty field. It
> also does not seem to have any Status for the printer.
> 
> But when I then go into Control panel/Printer and Faxes, there the
> Status is shown as 'OFFLINE'.  What a mess.
> 
> Anybody has any ideas how I can get a Status of a local USB printer??
> 
> ** Update: 
> I just read Peter;s reply to my earlier message; I will try a test
> page, immediately followed by checking the Status and see what
> happens...
> 
> *** Update 2
> Tried this. Now I print a test page to the not-connected printer and
> do a 'GetCurrentPrinterStatus' immediately after.Result = 0; Job goes
> into the print spooler, which shows an empty field on Status.  Bart

Isn't Windows' printing a wonder to behold? Whoever designed that, and
the matching API, deserves to be staked out, covered with honey, near
an ant hill <g>.

Perhaps you would get a more meaningful status if you check the status
of the print job and not that of the printer. The Winspool unit also
defines the part of the spooler API dealing with jobs. Unfortunately
there is no direct way to get a job ID from TPrinter, so you have to
enumerate the jobs in the current printer's queue.

Here is another old example from my files for your delectation:

{code: Delphi}
Example for EnumJobs

Uses Winspool, printers;

{-- GetCurrentPrinterHandle -------------------------------------------}
{: Retrieves the handle of the current printer
@Returns an API printer handle for the current printer
@Desc Uses WinSpool.OpenPrinter to get a printer handle. The caller
  takes ownership of the handle and <b>must</b> call ClosePrinter on it
  once the handle is no longer needed. Failing to do that creates a
  serious resource leak! <P>
  Requires Printers and WinSpool in the Uses clause.
@Raises EWin32Error if the OpenPrinter call fails.
}{ Created 30.9.2000 by P. Below
-----------------------------------------------------------------------}
Function GetCurrentPrinterHandle: THandle;
  Const
    Defaults: TPrinterDefaults = (
      pDatatype : nil;
      pDevMode  : nil;
      DesiredAccess : PRINTER_ACCESS_USE or PRINTER_ACCESS_ADMINISTER );
  Var
    Device, Driver, Port : array[0..255] of char;
    hDeviceMode: THandle;
  Begin { GetCurrentPrinterHandle }
    Printer.GetPrinter(Device, Driver, Port, hDeviceMode);
    If not OpenPrinter(@Device, Result, @Defaults) Then
      RaiseLastWin32Error;
  End; { GetCurrentPrinterHandle }

Function SafePChar( p: PChar ): PChar;
const error: PChar = 'Nil';
begin
  if not assigned( p ) then
    result := error
  else
    result := p;
end;          

procedure TForm1.Button2Click(Sender: TObject);
type
  TJobs = Array [0..1000] of JOB_INFO_1;
  PJobs = ^TJobs;
var
  hPrinter : THandle;
  bytesNeeded, numJobs, i: Cardinal;
  pJ: PJobs;
begin
  hPrinter:= GetCurrentPrinterHandle;
  try
    EnumJobs( hPrinter, 0, 1000, 1, Nil, 0, bytesNeeded,
              numJobs );
    pJ := AllocMem( bytesNeeded );
    If not EnumJobs( hPrinter, 0, 1000, 1, pJ, bytesNeeded,
                     bytesNeeded, numJobs )
    Then
      RaiseLastWin32Error;

    memo1.clear;
    if numJobs = 0 Then
      memo1.lines.add('No jobs in queue')
    else
      For i:= 0 to Pred(numJobs) Do
        memo1.lines.add( Format(
          'Job %s, Status (%d): %s',
          [SafePChar(pJ^[i].pDocument), pJ^[i].Status,
SafePChar(pJ^[i].pStatus)] ));
  finally
    ClosePrinter( hPrinter );
  end;
end;
{code}


-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
0
Peter
4/21/2010 6:22:47 PM
Peter

>Isn't Windows' printing a wonder to behold? Whoever designed that, and
>the matching API, deserves to be staked out, covered with honey, near
>an ant hill <g>.

Only if the looney who came up with the registry goes first!

Roy Lambert
0
Roy
4/21/2010 7:30:21 PM
> {quote:title=Peter Below wrote:}
> Perhaps you would get a more meaningful status if you check the status
> of the print job and not that of the printer.

You are not going to believe it (or maybe you do) but the result:

"Job SARTrack Test page, Status (0): Nil"

But on the Caption of the Print Spooler it says this:
"HP Deskjet 460 Series - Use Printer Offline"

It _does_ know the printer is off-line; Why can't _I_ get that information? I must be doing something wrong; like the Status is cleared before I get to it?

The Print Job fields 'Status' and 'Port' are empty.

UPDATE:

I went back to your original GetCurrentPrinterStatus. But this time I called it _before_ I called 'EndDoc' in the Printer unit.
But what happened is, I got an Exception "EPrinter: Printing in progress" in the calling procedure instead of a Status result... 
So I cannnot call GetCurrentPrinterStatus while I have a print job open either...

Bart

Edited by: Bart Kindt on Apr 21, 2010 1:15 PM
0
Bart
4/21/2010 8:22:41 PM
I am re-opening the thread, see if anybody else has any ideas...
0
Bart
4/21/2010 9:51:59 PM
> {quote:title=Bart Kindt wrote:}{quote}
> I am re-opening the thread, see if anybody else has any ideas...


I found this thread while looking for some virtual printer info, anyway, I was trying to do a similar thing, send printer out put to a physical printer on a local network and short of walking 2 buildings over to the printer to see if it printed I was at a loss... my app would hang and then give no response. My answer might not be exactly what you are looking for but out of frustration I would print to a virtual printer then highlight the file created, right click - send to... the desktop of the PC of the 
person who is in need of the output, send them an email with the file name and let them print it out at their convenience. Not a very elegant solution but so far it has worked.
0
Mark
3/31/2011 7:28:02 AM
> {quote:title=Bart Kindt wrote:}{quote}
> I am printing to a network printer.
> Is there any way I can check if the printer is in fact available?
> 
> I am using the Printers unit.
> 
> When I execute the windows PrintForm.PrintDialog1.Execute(Self.handle), I get a list of printers; Including Network printers which do not exist on the current network. A Refresh does not help.
> When I then try to print to this non-existing network printer, the whole application freezes up for up to a minute, after which all comes back, but without any errors, and without any printer spool window.
> I have no idea what has now happened to the document.
> 
> I cannot afford my app to be in this situation: I need to be sure the printer is in fact available.
> How?
> 
> Thanks, Bart




Hello, I’m aris from Indonesia.
I have tried the suggestions and proposals from Delphi master.
but i can not get printer status,
I use a dot matrix printer (Epson LX300 + II),
how the solution of the problems I faced,
thanks, any help is very valuable for me
0
aris
10/17/2011 7:45:11 AM
> {quote:title=Mark Patenaude wrote:}{quote}
> > {quote:title=Bart Kindt wrote:}{quote}
> > I am re-opening the thread, see if anybody else has any ideas...
> 
> 
> I found this thread while looking for some virtual printer info, anyway, I was trying to do a similar thing, send printer out put to a physical printer on a local network and short of walking 2 buildings over to the printer to see if it printed I was at a loss... my app would hang and then give no response. My answer might not be exactly what you are looking for but out of frustration I would print to a virtual printer then highlight the file created, right click - send to... the desktop of the PC of th
e person who is in need of the output, send them an email with the file name and let them print it out at their convenience. Not a very elegant solution but so far it has worked.

hello..
How do I'm get the status monitor of the EPSON STATUS MONITOR 3 ?, I've tried to detect the status direct from the driver, not from windows, 
but I just get the status from the windows, not from DRIVER, the difference : 
if from the windows after the printing is executed then the status is successful automatically, although printing not yet finished.
Well, how can I communicate with the printer driver
I'm using printer EPSON LX-300+II, delphi2010, windows7.
does anyone ever have problems like me ???
Please help me.
thank...
0
aris
10/18/2011 10:09:05 AM
Reply:

Similar Artilces:

Printers Printers Printers!!
Hi All, I have two Printers installed on win2k with default set. However, I another user logs in, default changes......can I force the default printer set?? I'm also using DLU - Volitile and Zen 4. Can I force the default for that particular room each time? Examples would be of great assistance...;-) Many thanks. Using NWadmin, do a properties on the user, group, or container, and go to the NDPS Remote printer button, highlight the printer then click set as default. ...

Printer Status
This is a multi-part message in MIME format. ---=_forums-1-dub46b9f93c Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Hi I am trying to get the Printer Status using the GetPrinter function provided by windows WINSPOOL.DRV. I am getting one problem in getting the printer status that Status is always 0 which is ready even though on the Window Print Manager I can see 'Error' or 'Toner Low' I put the code in the timer event to fetch the status every one second but with no success. Please suggest. I have extended over ...

Delphi.NET loading Delphi.Win32 Driver
Hi, What I'm trying to do is marshal an array of cardinal (or integer) back into managed memory from a win32 dll. I know how to pass managed memory into a win32 dll {code} var aa : array of Integer; Buffer : IntPtr; begin SetLength(aa,2); aa[0] := 1; aa[1] := 80; if not Supports(ExtractFilePath(Application.ExeName)+'Win32_Library\SDK_Driver.Win32.io', TypeOf(IMyFunctions), MyFunctions) then Exit; //loads the driver into memory. MyFunctions contains the method names found in the SDK_Driver. Buffer := Marshal.AllocHGlobal(2 * {Marshal.SystemDefaultC...

delphi Win32 using delphi .NET dll
Hi, I'm trying to use a delphi.NET dll in delphi.WIN32. I am currently using CodeGear Delphi 2007 with version2(base version) of .NET I can get the dll to import into the WIN32 application the only problem is when i include things such as: "using Classes,DateUtils, SysUtils" in the .NET dll the win32 application will instantly hang when any of the dll functions are called. Any help would be great thanks. Also I have tried this example and it also crashes for me? http://cc.embarcadero.com/Item/22688 -Braden I also found this.. "The problem is that, wehn you instal...

Converting Delphi for Win32 to Delphi .Net(Prism)
Hi, I am currently migrating a project from Delphi for Win32 to Delphi.net. Part of my code currently goes into a directory and pulls out a random file from this directory and loads the contents of the file for me. This code doesn't seem to work in Delphi.Net. It uses PString and a number of functions in SysUtils that don't seem to be present in Delphi.net's SysUtils file. If anyone can help me please, it would be greatly appreciated! Many thanks, Jonathan Mackey Jonathan Mackey a écrit : > I am currently migrating a project from Delphi for Win32 to &...

Migrate from Delphi 2007 for Win32 to Delphi XE
we use Delphi 2007 for Win32 to support legacy (32Bit) OWL-based pascal applications (yes i know it was a mistake not to switch to VCL 15 years ago). could our applications still be opened and compiled with Delphi XE? The existing projects are all plain Pascal-Code, coming back from the times of Turbo Pascal for Windows and later on Borland Pascal. Are there any improvements we could profit from (i.e IDE, Debugger)? Thanks Andrej > {quote:title=Andrej Dimic wrote:}{quote} > could our applications still be opened and compiled with Delphi XE? I'm not sure, but I guess ...

iprint printer slow to connect (printer status opening)
Hi, I've been searching about a solution reguarding the slow connection to the printer: applications take ages to connect to user's printer, application status was: opening (printer status stayed in opening for 10 seconds ...) I've seen some post about that but without any real solution, well, the proposed one didn't do anything for our system. We're using Citrix Metaframe 1.8 in windows 2000 server SP4 with many hotfixes ... The problems was this hotfixe: KB324446 After removing it the problem went away. BTW, removing this hotfix solve many slowness of...

Win32 program: Delphi 7 vs Delphi XE5
How is a D7 Win32 program compared to a Delphi XE5 one in terms of stability and performance? Is Delphi XE5 good enough for a big ERP project with several DLL's and hundreds of units and forms? Thanks in advance Am 26.12.2013 15:02, schrieb lior ilan: > How is a D7 Win32 program compared to a Delphi XE5 one in terms of stability > and performance? > Is Delphi XE5 good enough for a big ERP project with several DLL's and > hundreds of units and forms? > Thanks in advance > Hello, XE5 has increased functionality. Stability seems to be ok for most ...

iprint printer slow to connect (printer status opening)
Hi, I've been searching about a solution reguarding the slow connection to the printer: applications take ages to connect to user's printer, application status was: opening (printer status stayed in opening for 10 seconds ...) I've seen some post about that but without any real solution, well, the proposed one didn't do anything for our system. We're using Citrix Metaframe 1.8 in windows 2000 server SP4 with many hotfixes ... The problems was this hotfixe: KB324446 After removing it the problem went away. BTW, removing this hotfix solve many slowness of...

Printer map printer status screen does not have full functionality
I have two different servers running iPrint. When a user clicks on the iPrint map with a printer they already have installed then it pops up a status window about the printer. On one server it shows information and a refresh button. On the other server it shows different buttons like, refresh, delete, hold, resume and information. I would like to have both servers to show the more functional one. I have not found any configuration setting I need to switch. Any ideas? Thanks. --____WKISEEMCOXWTOIDZWXLP____ Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Enc...

Win32 status
Hi, Since you are making a release pretty soon, I'm reporting the state of Parrot on Win32 and running my tinderbox client :) Parrot compiles nicely, but compiling it requires quite much memory, sometimes the compiler process takes up more than 32MB... The reason of course is the gigantic core_ops.c (800kb) and the huge switch statements. I'm using the box I have for other stuff too, and having 32MB chunks ripped out of your memory at random times is not nice :) Tests: fail. miserably. 100% crashed :) probably some illegal pointer deref. It would be nice to include some ex...

Win32 Delphi language features introduced since Delphi 7
Hi, Am I right in thinking that the language features introduced since Delphi 7 fall into the categories: a) language features dictated by .Net compatibility. e.g. Namespaces, Inlining, records with methods, operator overloading, pure interfaces, generics, extended RTTI and reflection; b) Unicode strings and supporting procedures? c) 64-bit support What other language features, if any, have been introduced since D7? Had most of the post-D7 languages features, except for generics, Unicode strings, and 64-bit support, been introduced in or before Delphi 2005? How bug-free were ...

Win32 status
Nick C will be delighted to hear that Win32 now passes 1/2 of socketpair tests. The infamous $! test #14 fails but should be fixable. Changed tests to "skip" the SOCK_DGRAM tests - not clear that winsock does UDP so cannot emulate it ... ( how does one have more than one SKIP: {} block in a test ? is the SKIP: label special ? ) Big snag now is that thread cv_stress test now hangs (for at least 4 hours) and ^C kills whole harness so don't know about ones beyond that. -- Nick Ing-Simmons http://www.ni-s.u-net.com/ On Sat, Jan 12, 2002 at 01:42:07PM +0...

Printer Status
Hi, This is Jay, Park. I'd like to get a printer status. I'm developing my program with powerbuilder 6.5. under windows 95. And the printer which I'd like to get the status of is Panasonic KX-P1624. Please let me know how I can get the printer status. Please. Please. Please. Of course, I know I must use API. But I'm not good at that. Please show me any sample API coding which gets a printer status. And I tried a software called PowerPrinter. But it didn't work well. Please help. This is urgent. Email ID : park019@hotmail.com ...

Printer is a Printer
Is there a way to determine if a printer is really a printer and not a fax or pdf writer/creator? Our application requires that once a button is press, we print a form and the client signs it. We display a dialog allowing you to pick a printer, but the printer list contains, 'non-printers'. And we do not want to show them. I realize that this may not be possible, but I have to ask. Thanks Edwin, > Is there a way to determine if a printer is really a printer and not a fax or pdf writer/creator? > > Our application requires that once a button is press, we prin...

[PATCH] Move Win32 from win32/ext/Win32 to ext/Win32
To compile the Win32 module under both "MSWin32" and "cygwin" the module needs to be moved to the ext/ subdirectory. To preserve the change history this should be done with `p4 integrate`: p4 integrate win32/ext/Win32/... ext/Win32/... p4 delete win32/ext/Win32/... The attached patch then updates Configure to build the module under cygwin only, and updates the MANIFEST. The MSWin32 builds will continue to find the module automatically using the FindExt.pm module. Cheers, -Jan diff -dur bleadperl/Configure bleadnew/Configure --- bleadperl/Conf...

Printer.Printers does not show all installed printers
I use this code with Delphi 2007: for I := 0 to Pred(Printer.Printers.Count) do Listbox1.items.add(Printer.Printers[I]); I have a customer that has a Xerox Phaser printer installed which is his default printer but it does not show in the list. He is using Windows 7, 64bit. Anyone have an idea as to why this might happen ? Thanks JT ...

re: [PATCH] Move Win32::* functions from win32/win32.c to ext/Win32/Win32.xs
----=_e3pon25ktlh8mqd3tgjj1tt7en166ucrfq.MFSBCHJLHS Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > patch2.diff moves the Win32::* functions into the ext/Win32 module and > adds forwarder functions to load the module at runtime on first use: > > static void > forward(pTHX_ const char *function) > { > dXSARGS; > Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT, newSVpvn("Win32",5), NULL); > PUSHMARK(SP-items); > call_pv(function, GIMME_V); > } It just occurred to me that Perl_load_modul...

how to get printer status
now i facing a problem regarding to detect printer status, like paper out, printer not on, paper not ready. i have to detect the status of printer before i send the print job. is there any sample code to detect printer status? your help is much apperciate. Check the enunjobs sample on CodeXchange, which reports back the status as well: http://www.sybase.com/detail?id=1058501 On Mon, 13 Jul 2009 04:21:12 -0700 (PDT), dave <chinho80@gmail.com> wrote: >now i facing a problem regarding to detect printer status, like paper >out, printer not on, paper not ready. >...

Win32 API Printer
I'm using Powerbuilder 6.5 and we are having problems with a module in our application and we found out that part of the reason is there are a couple of datawindow that are communicating with the printer and this is slowing down the application. What we have decided to do is use Win32API to disable the default printer so that there's no printer and then put back the printer just before you call the print command. Now I've been doing some research on this and I notice that one has to declare the Win32API functions first before they can be used. Can you help me with t...

SMB printer status
Windows computers on my network are able to print to the printer I have shared with samba on my Suse 11.0 box, but the status message says "Access Denied, Unable To Connect" I would like to see the normal "Ready" status message. I've read through some similar posts regarding this same issue and have made some changes to my smb.conf and cupsd.conf files. smb.conf Code: -------------------- # smb.conf is the main Samba configuration file. You find a full commented # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the # samba...

Checking a printer status.
Good day everyone. I was wondering is there any way to check out a printer status, like if it is on or ready for printing? Any help/advises are really appreciated. Michael. ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp Can you explain why would you need this in the context of a business application? Anyhow, you most likely would need to use GetPrinter API, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_1gky.asp most likely with Level 6 flag (Windows 2000/XP): A PRINTER_INFO_6 struct...

Getting a printer Status.
Does anyone know how to get the printer status and information from within powerbuilder. I assume its the use of an API call. Which one? I am trying to mimic the print options dialogue window like in Microsoft Word. Their 'printer dialog' shows a printer status of 'Idle' for the default printer. Thanks, GK You can use GetPrinter() API function. Check for Win32sdk documentation for that. Mahendra Dhamdhere WorkerB wrote in message ... >Does anyone know how to get the printer status and information >from within powerbuilder. I assume its the use ...

How to poll printer for status
PB 6.5 build 1082 Windows 2000 Microsoft SQL Server 2000 I'd like to know if there is a method for polling the status of a networked printer before printing to it. For example, we'd like to write code to check whether a printer on a network is off line, paper jammed, just not available, before we send a dw_1.print() call. Is there any way, even with external functions, to do this? Thanks in advance, Scott Gorke Programmer/Analyst II Picis, Inc. Wakefield, MA scott_gorke@picis.com ...

Web resources about - Printer status - embarcadero.delphi.win32

Game Boy Printer - Wikipedia, the free encyclopedia
The Game Boy Printer is compatible with all the Game Boy systems except the Game Boy Micro , and is designed to be used in conjunction with the ...

Loving the new job. Fleet master for 30 printers(strong possib... - Facebook
Facebook is a social utility that connects people with friends and others who work, study and live around them. People use Facebook to keep ...

IC3D Printers (@IC3D_Printers) on Twitter
Sign in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here IC3D Printers @ IC3D_Printers ...

Thread: Are there any wireless laser printers that work?
I got a Brother printer a few years back on the recommendation of a friend, and it's been a wonderful printer. Fast and trouble-free. As someone ...

App Store - ACTPrinter - Virtual Printer for iPhone / iPad
Read reviews, get customer ratings, see screenshots, and learn more about ACTPrinter - Virtual Printer for iPhone / iPad on the App Store. Download ...

3D Printer - Flickr - Photo Sharing!
Explore Oliver Quinlan's photos on Flickr. Oliver Quinlan has uploaded 1006 photos to Flickr.


Can you really get a solid all-in-one printer, copier and scanner for just $90?
... Deals team's advice. And in this case, we're going to help you upgrade to the Epson WorkForce WF-3620 WiFi Direct All-in-One Color Inkjet Printer, ...

Engineering students invented a 'pancake printer' that takes breakfast to the next level
It's Pancake Day! And what better way to celebrate than with the modern marvel that is this machine that will create pancakes in any shape you ...

How 3D printers are changing plastic surgery
The new technology is allowing patients to see a preview of their new faces before going under the knife

Resources last updated: 2/20/2016 5:31:59 PM