Hallo.
Wie kann man das mit Hilfe von Alaska Xbase++ machen
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-----------------------------------------------
PRINTER API
Moderator: Moderatoren
-
- Rookie
- Beiträge: 3
- Registriert: Mo, 12. Mai 2008 8:19
- Kontaktdaten:
- Rolf Ramacher
- Der Entwickler von "Deep Thought"
- Beiträge: 1930
- Registriert: Do, 09. Nov 2006 10:33
- Wohnort: Bergheim
- Danksagung erhalten: 3 Mal
- Kontaktdaten: