PRINTER API

Fragen rund um diverse Windows-Versionen, ihr Verhalten unter Xbase++ und den Umgang mit der API

Moderator: Moderatoren

Antworten
Shuliakovsky
Rookie
Rookie
Beiträge: 3
Registriert: Mo, 12. Mai 2008 8:19
Kontaktdaten:

PRINTER API

Beitrag von Shuliakovsky »

Hallo.
Wie kann man das mit Hilfe von Alaska Xbase++ machen :cry:
http://support.microsoft.com/kb/160456/en-us
------------------------------BEGIN---------------------------
HOWTO: How To Change the Work Offline Status of a Printer

1. Retrieve a PRINTER_INFO_2 structure for the printer by calling the GetPrinter function multiple times.
2. Change the PRINTER_ATTRIBUTE_WORK_OFFLINE bit of a PRINTER_INFO_2 structure's Attribute member. The following sample code illustrates how to clear or set a bit of this bitfield properly:
if (pi2->Attributes & PRINTER_ATTRIBUTE_WORK_OFFLINE)
{
DWORD dwStatusMask;

/* set, so clear the bit */
dwStatusMask = ~(DWORD)(PRINTER_ATTRIBUTE_WORK_OFFLINE);
pi2->Attributes = pi2->Attributes & dwStatusMask;
}
else
{
/* not set, so set it */
pi2->Attributes = pi2->Attributes | PRINTER_ATTRIBUTE_WORK_OFFLINE;
}

3. Call the SetPrinter function to set the state of the printer by passing the modified structure.
--------------------------END-----------------------------------------------
Benutzeravatar
Rolf Ramacher
Der Entwickler von "Deep Thought"
Der Entwickler von "Deep Thought"
Beiträge: 1930
Registriert: Do, 09. Nov 2006 10:33
Wohnort: Bergheim
Danksagung erhalten: 3 Mal
Kontaktdaten:

Beitrag von Rolf Ramacher »

Hi

schau dir mal die XbpPrinter() und XbpPrintDialog() an. Vielleicht hilft es dir weiter
Gruß Rolf

Mitglied der Gruppe XUG-Cologne
www.xug-cologne.de
Antworten