home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1996 August
/
VPR9608A.BIN
/
del20try
/
install
/
data.z
/
WINSPOOL.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-05-08
|
50KB
|
1,096 lines
{*******************************************************}
{ }
{ Delphi Run-time Library }
{ Windows 32bit API Interface Unit }
{ }
{ Copyright (c) 1996 Borland International }
{ }
{*******************************************************}
unit WinSpool;
interface
uses Windows;
type
PPrinterInfo1A = ^TPrinterInfo1A;
PPrinterInfo1W = ^TPrinterInfo1W;
PPrinterInfo1 = PPrinterInfo1A;
TPrinterInfo1A = record
Flags: DWORD;
pDescription: PAnsiChar;
pName: PAnsiChar;
pComment: PAnsiChar;
end;
TPrinterInfo1W = record
Flags: DWORD;
pDescription: PWideChar;
pName: PWideChar;
pComment: PWideChar;
end;
TPrinterInfo1 = TPrinterInfo1A;
PPrinterInfo2A = ^TPrinterInfo2A;
PPrinterInfo2W = ^TPrinterInfo2W;
PPrinterInfo2 = PPrinterInfo2A;
TPrinterInfo2A = record
pServerName: PAnsiChar;
pPrinterName: PAnsiChar;
pShareName: PAnsiChar;
pPortName: PAnsiChar;
pDriverName: PAnsiChar;
pComment: PAnsiChar;
pLocation: PAnsiChar;
pDevMode: PDeviceModeA;
pSepFile: PAnsiChar;
pPrintProcessor: PAnsiChar;
pDatatype: PAnsiChar;
pParameters: PAnsiChar;
pSecurityDescriptor: PSecurityDescriptor;
Attributes: DWORD;
Priority: DWORD;
DefaultPriority: DWORD;
StartTime: DWORD;
UntilTime: DWORD;
Status: DWORD;
cJobs: DWORD;
AveragePPM: DWORD;
end;
TPrinterInfo2W = record
pServerName: PWideChar;
pPrinterName: PWideChar;
pShareName: PWideChar;
pPortName: PWideChar;
pDriverName: PWideChar;
pComment: PWideChar;
pLocation: PWideChar;
pDevMode: PDeviceModeW;
pSepFile: PWideChar;
pPrintProcessor: PWideChar;
pDatatype: PWideChar;
pParameters: PWideChar;
pSecurityDescriptor: PSecurityDescriptor;
Attributes: DWORD;
Priority: DWORD;
DefaultPriority: DWORD;
StartTime: DWORD;
UntilTime: DWORD;
Status: DWORD;
cJobs: DWORD;
AveragePPM: DWORD;
end;
TPrinterInfo2 = TPrinterInfo2A;
PPrinterInfo3A = ^TPrinterInfo3A;
PPrinterInfo3W = ^TPrinterInfo3W;
PPrinterInfo3 = PPrinterInfo3A;
TPrinterInfo3A = record
pSecurityDescriptor: PSecurityDescriptor;
end;
TPrinterInfo3W = record
pSecurityDescriptor: PSecurityDescriptor;
end;
TPrinterInfo3 = TPrinterInfo3A;
PPrinterInfo4A = ^TPrinterInfo4A;
PPrinterInfo4W = ^TPrinterInfo4W;
PPrinterInfo4 = PPrinterInfo4A;
TPrinterInfo4A = record
pPrinterName: PAnsiChar;
pServerName: PAnsiChar;
Attributes: DWORD;
end;
TPrinterInfo4W = record
pPrinterName: PWideChar;
pServerName: PWideChar;
Attributes: DWORD;
end;
TPrinterInfo4 = TPrinterInfo4A;
PPrinterInfo5A = ^TPrinterInfo5A;
PPrinterInfo5W = ^TPrinterInfo5W;
PPrinterInfo5 = PPrinterInfo5A;
TPrinterInfo5A = record
pPrinterName: PAnsiChar;
pPortName: PAnsiChar;
Attributes: DWORD;
DeviceNotSelectedTimeout: DWORD;
TransmissionRetryTimeout: DWORD;
end;
TPrinterInfo5W = record
pPrinterName: PWideChar;
pPortName: PWideChar;
Attributes: DWORD;
DeviceNotSelectedTimeout: DWORD;
TransmissionRetryTimeout: DWORD;
end;
TPrinterInfo5 = TPrinterInfo5A;
const
PRINTER_CONTROL_PAUSE = 1;
PRINTER_CONTROL_RESUME = 2;
PRINTER_CONTROL_PURGE = 3;
PRINTER_CONTROL_SET_STATUS = 4;
PRINTER_STATUS_PAUSED = $00000001;
PRINTER_STATUS_ERROR = $00000002;
PRINTER_STATUS_PENDING_DELETION = $00000004;
PRINTER_STATUS_PAPER_JAM = $00000008;
PRINTER_STATUS_PAPER_OUT = $00000010;
PRINTER_STATUS_MANUAL_FEED = $00000020;
PRINTER_STATUS_PAPER_PROBLEM = $00000040;
PRINTER_STATUS_OFFLINE = $00000080;
PRINTER_STATUS_IO_ACTIVE = $00000100;
PRINTER_STATUS_BUSY = $00000200;
PRINTER_STATUS_PRINTING = $00000400;
PRINTER_STATUS_OUTPUT_BIN_FULL = $00000800;
PRINTER_STATUS_NOT_AVAILABLE = $00001000;
PRINTER_STATUS_WAITING = $00002000;
PRINTER_STATUS_PROCESSING = $00004000;
PRINTER_STATUS_INITIALIZING = $00008000;
PRINTER_STATUS_WARMING_UP = $00010000;
PRINTER_STATUS_TONER_LOW = $00020000;
PRINTER_STATUS_NO_TONER = $00040000;
PRINTER_STATUS_PAGE_PUNT = $00080000;
PRINTER_STATUS_USER_INTERVENTION = $00100000;
PRINTER_STATUS_OUT_OF_MEMORY = $00200000;
PRINTER_STATUS_DOOR_OPEN = $00400000;
PRINTER_STATUS_SERVER_UNKNOWN = $00800000;
PRINTER_STATUS_POWER_SAVE = $01000000;
PRINTER_ATTRIBUTE_QUEUED = $00000001;
PRINTER_ATTRIBUTE_DIRECT = $00000002;
PRINTER_ATTRIBUTE_DEFAULT = $00000004;
PRINTER_ATTRIBUTE_SHARED = $00000008;
PRINTER_ATTRIBUTE_NETWORK = $00000010;
PRINTER_ATTRIBUTE_HIDDEN = $00000020;
PRINTER_ATTRIBUTE_LOCAL = $00000040;
PRINTER_ATTRIBUTE_ENABLE_DEVQ = $00000080;
PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS = $00000100;
PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = $00000200;
PRINTER_ATTRIBUTE_WORK_OFFLINE = $00000400;
PRINTER_ATTRIBUTE_ENABLE_BIDI = $00000800;
NO_PRIORITY = 0;
MAX_PRIORITY = 99;
MIN_PRIORITY = 1;
DEF_PRIORITY = 1;
type
PJobInfo1A = ^TJobInfo1A;
PJobInfo1W = ^TJobInfo1W;
PJobInfo1 = PJobInfo1A;
TJobInfo1A = record
JobId: DWORD;
pPrinterName: PAnsiChar;
pMachineName: PAnsiChar;
pUserName: PAnsiChar;
pDocument: PAnsiChar;
pDatatype: PAnsiChar;
pStatus: PAnsiChar;
Status: DWORD;
Priority: DWORD;
Position: DWORD;
TotalPages: DWORD;
PagesPrinted: DWORD;
Submitted: TSystemTime;
end;
TJobInfo1W = record
JobId: DWORD;
pPrinterName: PWideChar;
pMachineName: PWideChar;
pUserName: PWideChar;
pDocument: PWideChar;
pDatatype: PWideChar;
pStatus: PWideChar;
Status: DWORD;
Priority: DWORD;
Position: DWORD;
TotalPages: DWORD;
PagesPrinted: DWORD;
Submitted: TSystemTime;
end;
TJobInfo1 = TJobInfo1A;
PJobInfo2A = ^TJobInfo2A;
PJobInfo2W = ^TJobInfo2W;
PJobInfo2 = PJobInfo2A;
TJobInfo2A = record
JobId: DWORD;
pPrinterName: PAnsiChar;
pMachineName: PAnsiChar;
pUserName: PAnsiChar;
pDocument: PAnsiChar;
pNotifyName: PAnsiChar;
pDatatype: PAnsiChar;
pPrintProcessor: PAnsiChar;
pParameters: PAnsiChar;
pDriverName: PAnsiChar;
pDevMode: PDeviceModeA;
pStatus: PAnsiChar;
pSecurityDescriptor: PSECURITY_DESCRIPTOR;
Status: DWORD;
Priority: DWORD;
Position: DWORD;
StartTime: DWORD;
UntilTime: DWORD;
TotalPages: DWORD;
Size: DWORD;
Submitted: TSystemTime; { Time the job was spooled }
Time: DWORD; { How many seconds the job has been printing }
PagesPrinted: DWORD;
end;
TJobInfo2W = record
JobId: DWORD;
pPrinterName: PWideChar;
pMachineName: PWideChar;
pUserName: PWideChar;
pDocument: PWideChar;
pNotifyName: PWideChar;
pDatatype: PWideChar;
pPrintProcessor: PWideChar;
pParameters: PWideChar;
pDriverName: PWideChar;
pDevMode: PDeviceModeW;
pStatus: PWideChar;
pSecurityDescriptor: PSECURITY_DESCRIPTOR;
Status: DWORD;
Priority: DWORD;
Position: DWORD;
StartTime: DWORD;
UntilTime: DWORD;
TotalPages: DWORD;
Size: DWORD;
Submitted: TSystemTime; { Time the job was spooled }
Time: DWORD; { How many seconds the job has been printing }
PagesPrinted: DWORD;
end;
TJobInfo2 = TJobInfo2A;
const
JOB_CONTROL_PAUSE = 1;
JOB_CONTROL_RESUME = 2;
JOB_CONTROL_CANCEL = 3;
JOB_CONTROL_RESTART = 4;
JOB_CONTROL_DELETE = 5;
JOB_STATUS_PAUSED = $00000001;
JOB_STATUS_ERROR = $00000002;
JOB_STATUS_DELETING = $00000004;
JOB_STATUS_SPOOLING = $00000008;
JOB_STATUS_PRINTING = $00000010;
JOB_STATUS_OFFLINE = $00000020;
JOB_STATUS_PAPEROUT = $00000040;
JOB_STATUS_PRINTED = $00000080;
JOB_STATUS_DELETED = $00000100;
JOB_STATUS_BLOCKED_DEVQ = $00000200;
JOB_STATUS_USER_INTERVENTION = $00000400;
JOB_POSITION_UNSPECIFIED = 0;
type
PAddJobInfo1A = ^TAddJobInfo1A;
PAddJobInfo1W = ^TAddJobInfo1W;
PAddJobInfo1 = PAddJobInfo1A;
TAddJobInfo1A = record
Path: PAnsiChar;
JobId: DWORD;
end;
TAddJobInfo1W = record
Path: PWideChar;
JobId: DWORD;
end;
TAddJobInfo1 = TAddJobInfo1A;
PDriverInfo1A = ^TDriverInfo1A;
PDriverInfo1W = ^TDriverInfo1W;
PDriverInfo1 = PDriverInfo1A;
TDriverInfo1A = record
pName: PAnsiChar; { QMS 810 }
end;
TDriverInfo1W = record
pName: PWideChar; { QMS 810 }
end;
TDriverInfo1 = TDriverInfo1A;
PDriverInfo2A = ^TDriverInfo2A;
PDriverInfo2W = ^TDriverInfo2W;
PDriverInfo2 = PDriverInfo2A;
TDriverInfo2A = record
cVersion: DWORD;
pName: PAnsiChar; { QMS 810 }
pEnvironment: PAnsiChar; { Win32 x86 }
pDriverPath: PAnsiChar; { c:\drivers\pscript.dll }
pDataFile: PAnsiChar; { c:\drivers\QMS810.PPD }
pConfigFile: PAnsiChar; { c:\drivers\PSCRPTUI.DLL }
end;
TDriverInfo2W = record
cVersion: DWORD;
pName: PWideChar; { QMS 810 }
pEnvironment: PWideChar; { Win32 x86 }
pDriverPath: PWideChar; { c:\drivers\pscript.dll }
pDataFile: PWideChar; { c:\drivers\QMS810.PPD }
pConfigFile: PWideChar; { c:\drivers\PSCRPTUI.DLL }
end;
TDriverInfo2 = TDriverInfo2A;
PDriverInfo3A = ^TDriverInfo3A;
PDriverInfo3W = ^TDriverInfo3W;
PDriverInfo3 = PDriverInfo3A;
TDriverInfo3A = record
cVersion: DWORD;
pName: PAnsiChar; { QMS 810 }
pEnvironment: PAnsiChar; { Win32 x86 }
pDriverPath: PAnsiChar; { c:\drivers\pscript.dll }
pDataFile: PAnsiChar; { c:\drivers\QMS810.PPD }
pConfigFile: PAnsiChar; { c:\drivers\PSCRPTUI.DLL }
pHelpFile: PAnsiChar; { c:\drivers\PSCRPTUI.HLP }
pDependentFiles: PAnsiChar; { PSCRIPT.DLL\0QMS810.PPD\0PSCRIPTUI.DLL\0PSCRIPTUI.HLP\0PSTEST.TXT\0\0 }
pMonitorName: PAnsiChar; { "PJL monitor" }
pDefaultDataType: PAnsiChar; { "EMF" }
end;
TDriverInfo3W = record
cVersion: DWORD;
pName: PWideChar; { QMS 810 }
pEnvironment: PWideChar; { Win32 x86 }
pDriverPath: PWideChar; { c:\drivers\pscript.dll }
pDataFile: PWideChar; { c:\drivers\QMS810.PPD }
pConfigFile: PWideChar; { c:\drivers\PSCRPTUI.DLL }
pHelpFile: PWideChar; { c:\drivers\PSCRPTUI.HLP }
pDependentFiles: PWideChar; { PSCRIPT.DLL\0QMS810.PPD\0PSCRIPTUI.DLL\0PSCRIPTUI.HLP\0PSTEST.TXT\0\0 }
pMonitorName: PWideChar; { "PJL monitor" }
pDefaultDataType: PWideChar; { "EMF" }
end;
TDriverInfo3 = TDriverInfo3A;
PDocInfo1A = ^TDocInfo1A;
PDocInfo1W = ^TDocInfo1W;
PDocInfo1 = PDocInfo1A;
TDocInfo1A = record
pDocName: PAnsiChar;
pOutputFile: PAnsiChar;
pDatatype: PAnsiChar;
end;
TDocInfo1W = record
pDocName: PWideChar;
pOutputFile: PWideChar;
pDatatype: PWideChar;
end;
TDocInfo1 = TDocInfo1A;
PFormInfo1A = ^TFormInfo1A;
PFormInfo1W = ^TFormInfo1W;
PFormInfo1 = PFormInfo1A;
TFormInfo1A = record
Flags: DWORD;
pName: PAnsiChar;
Size: TSize;
ImageableArea: TRect;
end;
TFormInfo1W = record
Flags: DWORD;
pName: PWideChar;
Size: TSize;
ImageableArea: TRect;
end;
TFormInfo1 = TFormInfo1A;
PDocInfo2A = ^TDocInfo2A;
PDocInfo2W = ^TDocInfo2W;
PDocInfo2 = PDocInfo2A;
TDocInfo2A = record
pDocName: PAnsiChar;
pOutputFile: PAnsiChar;
pDatatype: PAnsiChar;
dwMode: DWORD;
JobId: DWORD;
end;
TDocInfo2W = record
pDocName: PWideChar;
pOutputFile: PWideChar;
pDatatype: PWideChar;
dwMode: DWORD;
JobId: DWORD;
end;
TDocInfo2 = TDocInfo2A;
const
DI_CHANNEL = 1; { start direct read/write channel, }
DI_CHANNEL_WRITE = 2; { Direct write only - background read thread ok }
DI_READ_SPOOL_JOB = 3;
FORM_BUILTIN = $00000001;
type
PPrintProcessorInfo1A = ^TPrintProcessorInfo1A;
PPrintProcessorInfo1W = ^TPrintProcessorInfo1W;
PPrintProcessorInfo1 = PPrintProcessorInfo1A;
TPrintProcessorInfo1A = record
pName: PAnsiChar;
end;
TPrintProcessorInfo1W = record
pName: PWideChar;
end;
TPrintProcessorInfo1 = TPrintProcessorInfo1A;
PPortInfo1A = ^TPortInfo1A;
PPortInfo1W = ^TPortInfo1W;
PPortInfo1 = PPortInfo1A;
TPortInfo1A = record
pName: PAnsiChar;
end;
TPortInfo1W = record
pName: PWideChar;
end;
TPortInfo1 = TPortInfo1A;
PPortInfo2A = ^TPortInfo2A;
PPortInfo2W = ^TPortInfo2W;
PPortInfo2 = PPortInfo2A;
TPortInfo2A = record
pPortName: PAnsiChar;
pMonitorName: PAnsiChar;
pDescription: PAnsiChar;
fPortType: DWORD;
Reserved: DWORD;
end;
TPortInfo2W = record
pPortName: PWideChar;
pMonitorName: PWideChar;
pDescription: PWideChar;
fPortType: DWORD;
Reserved: DWORD;
end;
TPortInfo2 = TPortInfo2A;
const
PORT_TYPE_WRITE = $0001;
PORT_TYPE_READ = $0002;
PORT_TYPE_REDIRECTED = $0004;
PORT_TYPE_NET_ATTACHED = $0008;
type
PMonitorInfo1A = ^TMonitorInfo1A;
PMonitorInfo1W = ^TMonitorInfo1W;
PMonitorInfo1 = PMonitorInfo1A;
TMonitorInfo1A = record
pName: PAnsiChar;
end;
TMonitorInfo1W = record
pName: PWideChar;
end;
TMonitorInfo1 = TMonitorInfo1A;
PMonitorInfo2A = ^TMonitorInfo2A;
PMonitorInfo2W = ^TMonitorInfo2W;
PMonitorInfo2 = PMonitorInfo2A;
TMonitorInfo2A = record
pName: PAnsiChar;
pEnvironment: PAnsiChar;
pDLLName: PAnsiChar;
end;
TMonitorInfo2W = record
pName: PWideChar;
pEnvironment: PWideChar;
pDLLName: PWideChar;
end;
TMonitorInfo2 = TMonitorInfo2A;
PDatatypesInfo1A = ^TDatatypesInfo1A;
PDatatypesInfo1W = ^TDatatypesInfo1W;
PDatatypesInfo1 = PDatatypesInfo1A;
TDatatypesInfo1A = record
pName: PAnsiChar;
end;
TDatatypesInfo1W = record
pName: PWideChar;
end;
TDatatypesInfo1 = TDatatypesInfo1A;
PPrinterDefaultsA = ^TPrinterDefaultsA;
PPrinterDefaultsW = ^TPrinterDefaultsW;
PPrinterDefaults = PPrinterDefaultsA;
TPrinterDefaultsA = record
pDatatype: PAnsiChar;
pDevMode: PDeviceModeA;
DesiredAccess: ACCESS_MASK;
end;
TPrinterDefaultsW = record
pDatatype: PWideChar;
pDevMode: PDeviceModeW;
DesiredAccess: ACCESS_MASK;
end;
TPrinterDefaults = TPrinterDefaultsA;
function EnumPrintersA(Flags: DWORD; Name: PAnsiChar; Level: DWORD;
pPrinterEnum: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumPrintersW(Flags: DWORD; Name: PWideChar; Level: DWORD;
pPrinterEnum: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumPrinters(Flags: DWORD; Name: PChar; Level: DWORD;
pPrinterEnum: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
const
PRINTER_ENUM_DEFAULT = $00000001;
PRINTER_ENUM_LOCAL = $00000002;
PRINTER_ENUM_CONNECTIONS = $00000004;
PRINTER_ENUM_FAVORITE = $00000004;
PRINTER_ENUM_NAME = $00000008;
PRINTER_ENUM_REMOTE = $00000010;
PRINTER_ENUM_SHARED = $00000020;
PRINTER_ENUM_NETWORK = $00000040;
PRINTER_ENUM_EXPAND = $00004000;
PRINTER_ENUM_CONTAINER = $00008000;
PRINTER_ENUM_ICONMASK = $00ff0000;
PRINTER_ENUM_ICON1 = $00010000;
PRINTER_ENUM_ICON2 = $00020000;
PRINTER_ENUM_ICON3 = $00040000;
PRINTER_ENUM_ICON4 = $00080000;
PRINTER_ENUM_ICON5 = $00100000;
PRINTER_ENUM_ICON6 = $00200000;
PRINTER_ENUM_ICON7 = $00400000;
PRINTER_ENUM_ICON8 = $00800000;
function OpenPrinterA(pPrinterName: PAnsiChar; var phPrinter: THandle; pDefault: PPrinterDefaultsA): BOOL; stdcall;
function OpenPrinterW(pPrinterName: PWideChar; var phPrinter: THandle; pDefault: PPrinterDefaultsW): BOOL; stdcall;
function OpenPrinter(pPrinterName: PChar; var phPrinter: THandle; pDefault: PPrinterDefaults): BOOL; stdcall;
function ResetPrinterA(hPrinter: THandle; pDefault: PPrinterDefaultsA): BOOL; stdcall;
function ResetPrinterW(hPrinter: THandle; pDefault: PPrinterDefaultsW): BOOL; stdcall;
function ResetPrinter(hPrinter: THandle; pDefault: PPrinterDefaults): BOOL; stdcall;
function SetJobA(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; Command: DWORD): BOOL; stdcall;
function SetJobW(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; Command: DWORD): BOOL; stdcall;
function SetJob(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; Command: DWORD): BOOL; stdcall;
function GetJobA(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
function GetJobW(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
function GetJob(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
function EnumJobsA(hPrinter: THandle; FirstJob, NoJobs, Level: DWORD; pJob: Pointer; cbBuf: DWORD;
var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumJobsW(hPrinter: THandle; FirstJob, NoJobs, Level: DWORD; pJob: Pointer; cbBuf: DWORD;
var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumJobs(hPrinter: THandle; FirstJob, NoJobs, Level: DWORD; pJob: Pointer; cbBuf: DWORD;
var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function AddPrinterA(pName: PAnsiChar; Level: DWORD; pPrinter: Pointer): THandle; stdcall;
function AddPrinterW(pName: PWideChar; Level: DWORD; pPrinter: Pointer): THandle; stdcall;
function AddPrinter(pName: PChar; Level: DWORD; pPrinter: Pointer): THandle; stdcall;
function DeletePrinter(hPrinter: THandle): BOOL; stdcall;
function SetPrinterA(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; Command: DWORD): BOOL; stdcall;
function SetPrinterW(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; Command: DWORD): BOOL; stdcall;
function SetPrinter(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; Command: DWORD): BOOL; stdcall;
function GetPrinterA(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
function GetPrinterW(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
function GetPrinter(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
function AddPrinterDriverA(pName: PAnsiChar; Level: DWORD; pDriverInfo: Pointer): BOOL; stdcall;
function AddPrinterDriverW(pName: PWideChar; Level: DWORD; pDriverInfo: Pointer): BOOL; stdcall;
function AddPrinterDriver(pName: PChar; Level: DWORD; pDriverInfo: Pointer): BOOL; stdcall;
function EnumPrinterDriversA(pName, pEnvironment: PAnsiChar; Level: DWORD;
pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumPrinterDriversW(pName, pEnvironment: PWideChar; Level: DWORD;
pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumPrinterDrivers(pName, pEnvironment: PChar; Level: DWORD;
pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function GetPrinterDriverA(hPrinter: THandle; pEnvironment: PAnsiChar; Level: DWORD;
pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function GetPrinterDriverW(hPrinter: THandle; pEnvironment: PWideChar; Level: DWORD;
pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function GetPrinterDriver(hPrinter: THandle; pEnvironment: PChar; Level: DWORD;
pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function GetPrinterDriverDirectoryA(pName, pEnvironment: PAnsiChar; Level: DWORD;
pDriverDirectory: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function GetPrinterDriverDirectoryW(pName, pEnvironment: PWideChar; Level: DWORD;
pDriverDirectory: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function GetPrinterDriverDirectory(pName, pEnvironment: PChar; Level: DWORD;
pDriverDirectory: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function DeletePrinterDriverA(pName, pEnvironment, pDriverName: PAnsiChar): BOOL; stdcall;
function DeletePrinterDriverW(pName, pEnvironment, pDriverName: PWideChar): BOOL; stdcall;
function DeletePrinterDriver(pName, pEnvironment, pDriverName: PChar): BOOL; stdcall;
function AddPrintProcessorA(pName, pEnvironment, pPathName, pPrintProcessorName: PAnsiChar): BOOL; stdcall;
function AddPrintProcessorW(pName, pEnvironment, pPathName, pPrintProcessorName: PWideChar): BOOL; stdcall;
function AddPrintProcessor(pName, pEnvironment, pPathName, pPrintProcessorName: PChar): BOOL; stdcall;
function EnumPrintProcessorsA(pName, pEnvironment: PAnsiChar; Level: DWORD; pPrintProcessorInfo: Pointer;
cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumPrintProcessorsW(pName, pEnvironment: PWideChar; Level: DWORD; pPrintProcessorInfo: Pointer;
cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumPrintProcessors(pName, pEnvironment: PChar; Level: DWORD; pPrintProcessorInfo: Pointer;
cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function GetPrintProcessorDirectoryA(pName, pEnvironment: PAnsiChar; Level: DWORD;
pPrintProcessorInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function GetPrintProcessorDirectoryW(pName, pEnvironment: PWideChar; Level: DWORD;
pPrintProcessorInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function GetPrintProcessorDirectory(pName, pEnvironment: PChar; Level: DWORD;
pPrintProcessorInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function EnumPrintProcessorDatatypesA(pName, pPrintProcessorName: PAnsiChar; Level: DWORD;
pDatatypes: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumPrintProcessorDatatypesW(pName, pPrintProcessorName: PWideChar; Level: DWORD;
pDatatypes: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumPrintProcessorDatatypes(pName, pPrintProcessorName: PChar; Level: DWORD;
pDatatypes: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function DeletePrintProcessorA(pName, pEnvironment, pPrintProcessorName: PAnsiChar): BOOL; stdcall;
function DeletePrintProcessorW(pName, pEnvironment, pPrintProcessorName: PWideChar): BOOL; stdcall;
function DeletePrintProcessor(pName, pEnvironment, pPrintProcessorName: PChar): BOOL; stdcall;
function StartDocPrinterA(hPrinter: THandle; Level: DWORD; pDocInfo: Pointer): DWORD; stdcall;
function StartDocPrinterW(hPrinter: THandle; Level: DWORD; pDocInfo: Pointer): DWORD; stdcall;
function StartDocPrinter(hPrinter: THandle; Level: DWORD; pDocInfo: Pointer): DWORD; stdcall;
function StartPagePrinter(hPrinter: THandle): BOOL; stdcall;
function WritePrinter(hPrinter: THandle; pBuf: Pointer; cbBuf: DWORD; var pcWritten: DWORD): BOOL; stdcall;
function EndPagePrinter(hPrinter: THandle): BOOL; stdcall;
function AbortPrinter(hPrinter: THandle): BOOL; stdcall;
function ReadPrinter(hPrinter: THandle; pBuf: Pointer; cbBuf: DWORD; var pNoBytesRead: DWORD): BOOL; stdcall;
function EndDocPrinter(hPrinter: THandle): BOOL; stdcall;
function AddJobA(hPrinter: THandle; Level: DWORD; pData: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function AddJobW(hPrinter: THandle; Level: DWORD; pData: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function AddJob(hPrinter: THandle; Level: DWORD; pData: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function ScheduleJob(hPrinter: THandle; JobId: DWORD): BOOL; stdcall;
function PrinterProperties(hWnd: HWND; hPrinter: THandle): BOOL; stdcall;
function DocumentPropertiesA(hWnd: HWND; hPrinter: THandle; pDeviceName: PAnsiChar;
const pDevModeOutput: TDeviceModeA; var pDevModeInput: TDeviceModeA;
fMode: DWORD): Longint; stdcall;
function DocumentPropertiesW(hWnd: HWND; hPrinter: THandle; pDeviceName: PWideChar;
const pDevModeOutput: TDeviceModeW; var pDevModeInput: TDeviceModeW;
fMode: DWORD): Longint; stdcall;
function DocumentProperties(hWnd: HWND; hPrinter: THandle; pDeviceName: PChar;
const pDevModeOutput: TDeviceMode; var pDevModeInput: TDeviceMode;
fMode: DWORD): Longint; stdcall;
function AdvancedDocumentPropertiesA(hWnd: HWND; hPrinter: THandle; pDeviceName: PAnsiChar;
pDevModeOutput, pDevModeInput: PDeviceModeA): Longint; stdcall;
function AdvancedDocumentPropertiesW(hWnd: HWND; hPrinter: THandle; pDeviceName: PWideChar;
pDevModeOutput, pDevModeInput: PDeviceModeW): Longint; stdcall;
function AdvancedDocumentProperties(hWnd: HWND; hPrinter: THandle; pDeviceName: PChar;
pDevModeOutput, pDevModeInput: PDeviceMode): Longint; stdcall;
function GetPrinterDataA(hPrinter: THandle; pValueName: PAnsiChar; pType: PDWORD; pData: Pointer;
nSize: DWORD; var pcbNeeded: DWORD): DWORD; stdcall;
function GetPrinterDataW(hPrinter: THandle; pValueName: PWideChar; pType: PDWORD; pData: Pointer;
nSize: DWORD; var pcbNeeded: DWORD): DWORD; stdcall;
function GetPrinterData(hPrinter: THandle; pValueName: PChar; pType: PDWORD; pData: Pointer;
nSize: DWORD; var pcbNeeded: DWORD): DWORD; stdcall;
function SetPrinterDataA(hPrinter: THandle; pValueName: PAnsiChar; dwType: DWORD; pData: Pointer; cbData: DWORD): DWORD; stdcall;
function SetPrinterDataW(hPrinter: THandle; pValueName: PWideChar; dwType: DWORD; pData: Pointer; cbData: DWORD): DWORD; stdcall;
function SetPrinterData(hPrinter: THandle; pValueName: PChar; dwType: DWORD; pData: Pointer; cbData: DWORD): DWORD; stdcall;
const
PRINTER_NOTIFY_TYPE = $00;
JOB_NOTIFY_TYPE = $01;
PRINTER_NOTIFY_FIELD_SERVER_NAME = $00;
PRINTER_NOTIFY_FIELD_PRINTER_NAME = $01;
PRINTER_NOTIFY_FIELD_SHARE_NAME = $02;
PRINTER_NOTIFY_FIELD_PORT_NAME = $03;
PRINTER_NOTIFY_FIELD_DRIVER_NAME = $04;
PRINTER_NOTIFY_FIELD_COMMENT = $05;
PRINTER_NOTIFY_FIELD_LOCATION = $06;
PRINTER_NOTIFY_FIELD_DEVMODE = $07;
PRINTER_NOTIFY_FIELD_SEPFILE = $08;
PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR = $09;
PRINTER_NOTIFY_FIELD_PARAMETERS = $0A;
PRINTER_NOTIFY_FIELD_DATATYPE = $0B;
PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR = $0C;
PRINTER_NOTIFY_FIELD_ATTRIBUTES = $0D;
PRINTER_NOTIFY_FIELD_PRIORITY = $0E;
PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY = $0F;
PRINTER_NOTIFY_FIELD_START_TIME = $10;
PRINTER_NOTIFY_FIELD_UNTIL_TIME = $11;
PRINTER_NOTIFY_FIELD_STATUS = $12;
PRINTER_NOTIFY_FIELD_STATUS_STRING = $13;
PRINTER_NOTIFY_FIELD_CJOBS = $14;
PRINTER_NOTIFY_FIELD_AVERAGE_PPM = $15;
PRINTER_NOTIFY_FIELD_TOTAL_PAGES = $16;
PRINTER_NOTIFY_FIELD_PAGES_PRINTED = $17;
PRINTER_NOTIFY_FIELD_TOTAL_BYTES = $18;
PRINTER_NOTIFY_FIELD_BYTES_PRINTED = $19;
JOB_NOTIFY_FIELD_PRINTER_NAME = $00;
JOB_NOTIFY_FIELD_MACHINE_NAME = $01;
JOB_NOTIFY_FIELD_PORT_NAME = $02;
JOB_NOTIFY_FIELD_USER_NAME = $03;
JOB_NOTIFY_FIELD_NOTIFY_NAME = $04;
JOB_NOTIFY_FIELD_DATATYPE = $05;
JOB_NOTIFY_FIELD_PRINT_PROCESSOR = $06;
JOB_NOTIFY_FIELD_PARAMETERS = $07;
JOB_NOTIFY_FIELD_DRIVER_NAME = $08;
JOB_NOTIFY_FIELD_DEVMODE = $09;
JOB_NOTIFY_FIELD_STATUS = $0A;
JOB_NOTIFY_FIELD_STATUS_STRING = $0B;
JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR = $0C;
JOB_NOTIFY_FIELD_DOCUMENT = $0D;
JOB_NOTIFY_FIELD_PRIORITY = $0E;
JOB_NOTIFY_FIELD_POSITION = $0F;
JOB_NOTIFY_FIELD_SUBMITTED = $10;
JOB_NOTIFY_FIELD_START_TIME = $11;
JOB_NOTIFY_FIELD_UNTIL_TIME = $12;
JOB_NOTIFY_FIELD_TIME = $13;
JOB_NOTIFY_FIELD_TOTAL_PAGES = $14;
JOB_NOTIFY_FIELD_PAGES_PRINTED = $15;
JOB_NOTIFY_FIELD_TOTAL_BYTES = $16;
JOB_NOTIFY_FIELD_BYTES_PRINTED = $17;
type
PPrinterNotifyOptionsType = ^TPrinterNotifyOptionsType;
TPrinterNotifyOptionsType = record
wType: Word;
Reserved0: Word;
Reserved1: DWORD;
Reserved2: DWORD;
Count: DWORD;
pFields: PWord;
end;
const
PRINTER_NOTIFY_OPTIONS_REFRESH = $01;
type
PPrinterNotifyOptions = ^TPrinterNotifyOptions;
TPrinterNotifyOptions = record
Version: DWORD;
Flags: DWORD;
Count: DWORD;
pTypes: PPrinterNotifyOptionsType;
end;
const
PRINTER_NOTIFY_INFO_DISCARDED = $01;
type
PPrinterNotifyInfoData = ^TPrinterNotifyInfoData;
TPrinterNotifyInfoData = record
wType: Word;
Field: Word;
Reserved: DWORD;
Id: DWORD;
NotifyData: record
case Integer of
0: (adwData: array[0..1] of DWORD);
1: (Data: record
cbBuf: DWORD;
pBuf: Pointer;
end);
end;
end;
PPrinterNotifyInfo = ^TPrinterNotifyInfo;
TPrinterNotifyInfo = record
Version: DWORD;
Flags: DWORD;
Count: DWORD;
aData: array[0..0] of TPrinterNotifyInfoData;
end;
function WaitForPrinterChange(hPrinter: THandle; Flags: DWORD): DWORD; stdcall;
function FindFirstPrinterChangeNotification(hPrinter: THandle; fdwFlags: DWORD;
fdwOptions: DWORD; pPrinterNotifyOptions: Pointer): THandle; stdcall;
function FindNextPrinterChangeNotification(hChange: THandle; var pdwChange: DWORD;
pvReserved: Pointer; var ppPrinterNotifyInfo: Pointer): BOOL; stdcall;
function FreePrinterNotifyInfo(pPrinterNotifyInfo: PPrinterNotifyInfo): BOOL; stdcall;
function FindClosePrinterChangeNotification(hChange: THandle): BOOL; stdcall;
const
PRINTER_CHANGE_ADD_PRINTER = $00000001;
PRINTER_CHANGE_SET_PRINTER = $00000002;
PRINTER_CHANGE_DELETE_PRINTER = $00000004;
PRINTER_CHANGE_FAILED_CONNECTION_PRINTER = $00000008;
PRINTER_CHANGE_PRINTER = $000000FF;
PRINTER_CHANGE_ADD_JOB = $00000100;
PRINTER_CHANGE_SET_JOB = $00000200;
PRINTER_CHANGE_DELETE_JOB = $00000400;
PRINTER_CHANGE_WRITE_JOB = $00000800;
PRINTER_CHANGE_JOB = $0000FF00;
PRINTER_CHANGE_ADD_FORM = $00010000;
PRINTER_CHANGE_SET_FORM = $00020000;
PRINTER_CHANGE_DELETE_FORM = $00040000;
PRINTER_CHANGE_FORM = $00070000;
PRINTER_CHANGE_ADD_PORT = $00100000;
PRINTER_CHANGE_CONFIGURE_PORT = $00200000;
PRINTER_CHANGE_DELETE_PORT = $00400000;
PRINTER_CHANGE_PORT = $00700000;
PRINTER_CHANGE_ADD_PRINT_PROCESSOR = $01000000;
PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = $04000000;
PRINTER_CHANGE_PRINT_PROCESSOR = $07000000;
PRINTER_CHANGE_ADD_PRINTER_DRIVER = $10000000;
PRINTER_CHANGE_SET_PRINTER_DRIVER = $20000000;
PRINTER_CHANGE_DELETE_PRINTER_DRIVER = $40000000;
PRINTER_CHANGE_PRINTER_DRIVER = $70000000;
PRINTER_CHANGE_TIMEOUT = $80000000;
PRINTER_CHANGE_ALL = $7777FFFF;
function PrinterMessageBoxA(hPrinter: THandle; Error: DWORD; hWnd: HWND; pText, pCaption: PAnsiChar;
dwType: DWORD): DWORD; stdcall;
function PrinterMessageBoxW(hPrinter: THandle; Error: DWORD; hWnd: HWND; pText, pCaption: PWideChar;
dwType: DWORD): DWORD; stdcall;
function PrinterMessageBox(hPrinter: THandle; Error: DWORD; hWnd: HWND; pText, pCaption: PChar;
dwType: DWORD): DWORD; stdcall;
const
PRINTER_ERROR_INFORMATION = $80000000;
PRINTER_ERROR_WARNING = $40000000;
PRINTER_ERROR_SEVERE = $20000000;
PRINTER_ERROR_OUTOFPAPER = $00000001;
PRINTER_ERROR_JAM = $00000002;
PRINTER_ERROR_OUTOFTONER = $00000004;
function ClosePrinter(hPrinter: THandle): BOOL; stdcall;
function AddFormA(hPrinter: THandle; Level: DWORD; pForm: Pointer): BOOL; stdcall;
function AddFormW(hPrinter: THandle; Level: DWORD; pForm: Pointer): BOOL; stdcall;
function AddForm(hPrinter: THandle; Level: DWORD; pForm: Pointer): BOOL; stdcall;
function DeleteFormA(hPrinter: THandle; pFormName: PAnsiChar): BOOL; stdcall;
function DeleteFormW(hPrinter: THandle; pFormName: PWideChar): BOOL; stdcall;
function DeleteForm(hPrinter: THandle; pFormName: PChar): BOOL; stdcall;
function GetFormA(hPrinter: THandle; pFormName: PAnsiChar; Level: DWORD; pForm: Pointer;
cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function GetFormW(hPrinter: THandle; pFormName: PWideChar; Level: DWORD; pForm: Pointer;
cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function GetForm(hPrinter: THandle; pFormName: PChar; Level: DWORD; pForm: Pointer;
cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
function SetFormA(hPrinter: THandle; pFormName: PAnsiChar; Level: DWORD; pForm: Pointer): BOOL; stdcall;
function SetFormW(hPrinter: THandle; pFormName: PWideChar; Level: DWORD; pForm: Pointer): BOOL; stdcall;
function SetForm(hPrinter: THandle; pFormName: PChar; Level: DWORD; pForm: Pointer): BOOL; stdcall;
function EnumFormsA(hPrinter: THandle; Level: DWORD; pForm: Pointer; cbBuf: DWORD;
var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumFormsW(hPrinter: THandle; Level: DWORD; pForm: Pointer; cbBuf: DWORD;
var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumForms(hPrinter: THandle; Level: DWORD; pForm: Pointer; cbBuf: DWORD;
var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumMonitorsA(pName: PAnsiChar; Level: DWORD; pMonitors: Pointer; cbBuf: DWORD;
var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumMonitorsW(pName: PWideChar; Level: DWORD; pMonitors: Pointer; cbBuf: DWORD;
var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumMonitors(pName: PChar; Level: DWORD; pMonitors: Pointer; cbBuf: DWORD;
var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function AddMonitorA(pName: PAnsiChar; Level: DWORD; pMonitors: Pointer): BOOL; stdcall;
function AddMonitorW(pName: PWideChar; Level: DWORD; pMonitors: Pointer): BOOL; stdcall;
function AddMonitor(pName: PChar; Level: DWORD; pMonitors: Pointer): BOOL; stdcall;
function DeleteMonitorA(pName, pEnvironment, pMonitorName: PAnsiChar): BOOL; stdcall;
function DeleteMonitorW(pName, pEnvironment, pMonitorName: PWideChar): BOOL; stdcall;
function DeleteMonitor(pName, pEnvironment, pMonitorName: PChar): BOOL; stdcall;
function EnumPortsA(pName: PAnsiChar; Level: DWORD; pPorts: Pointer; cbBuf: DWORD;
var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumPortsW(pName: PWideChar; Level: DWORD; pPorts: Pointer; cbBuf: DWORD;
var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function EnumPorts(pName: PChar; Level: DWORD; pPorts: Pointer; cbBuf: DWORD;
var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
function AddPortA(pName: PAnsiChar; hWnd: HWND; pMonitorName: PAnsiChar): BOOL; stdcall;
function AddPortW(pName: PWideChar; hWnd: HWND; pMonitorName: PWideChar): BOOL; stdcall;
function AddPort(pName: PChar; hWnd: HWND; pMonitorName: PChar): BOOL; stdcall;
function ConfigurePortA(pName: PAnsiChar; hWnd: HWND; pPortName: PAnsiChar): BOOL; stdcall;
function ConfigurePortW(pName: PWideChar; hWnd: HWND; pPortName: PWideChar): BOOL; stdcall;
function ConfigurePort(pName: PChar; hWnd: HWND; pPortName: PChar): BOOL; stdcall;
function DeletePortA(pName: PAnsiChar; hWnd: HWND; pPortName: PAnsiChar): BOOL; stdcall;
function DeletePortW(pName: PWideChar; hWnd: HWND; pPortName: PWideChar): BOOL; stdcall;
function DeletePort(pName: PChar; hWnd: HWND; pPortName: PChar): BOOL; stdcall;
function AddPrinterConnectionA(pName: PAnsiChar): BOOL; stdcall;
function AddPrinterConnectionW(pName: PWideChar): BOOL; stdcall;
function AddPrinterConnection(pName: PChar): BOOL; stdcall;
function DeletePrinterConnectionA(pName: PAnsiChar): BOOL; stdcall;
function DeletePrinterConnectionW(pName: PWideChar): BOOL; stdcall;
function DeletePrinterConnection(pName: PChar): BOOL; stdcall;
function ConnectToPrinterDlg(hwnd: HWND; Flags: DWORD): THandle; stdcall;
type
PProvidorInfo1A = ^TProvidorInfo1A;
PProvidorInfo1W = ^TProvidorInfo1W;
PProvidorInfo1 = PProvidorInfo1A;
TProvidorInfo1A = record
pName: PAnsiChar;
pEnvironment: PAnsiChar;
pDLLName: PAnsiChar;
end;
TProvidorInfo1W = record
pName: PWideChar;
pEnvironment: PWideChar;
pDLLName: PWideChar;
end;
TProvidorInfo1 = TProvidorInfo1A;
function AddPrintProvidorA(pName: PAnsiChar; level: DWORD; pProvidorInfo: Pointer): BOOL; stdcall;
function AddPrintProvidorW(pName: PWideChar; level: DWORD; pProvidorInfo: Pointer): BOOL; stdcall;
function AddPrintProvidor(pName: PChar; level: DWORD; pProvidorInfo: Pointer): BOOL; stdcall;
function DeletePrintProvidorA(pName, pEnvironment, pPrintProvidorName: PAnsiChar): BOOL; stdcall;
function DeletePrintProvidorW(pName, pEnvironment, pPrintProvidorName: PWideChar): BOOL; stdcall;
function DeletePrintProvidor(pName, pEnvironment, pPrintProvidorName: PChar): BOOL; stdcall;
const
SERVER_ACCESS_ADMINISTER = $00000001;
SERVER_ACCESS_ENUMERATE = $00000002;
PRINTER_ACCESS_ADMINISTER = $00000004;
PRINTER_ACCESS_USE = $00000008;
JOB_ACCESS_ADMINISTER = $00000010;
{ Access rights for print servers }
SERVER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or
SERVER_ACCESS_ADMINISTER or SERVER_ACCESS_ENUMERATE);
SERVER_READ = (STANDARD_RIGHTS_READ or SERVER_ACCESS_ENUMERATE);
SERVER_WRITE = (STANDARD_RIGHTS_WRITE or
SERVER_ACCESS_ADMINISTER or SERVER_ACCESS_ENUMERATE);
SERVER_EXECUTE = (STANDARD_RIGHTS_EXECUTE or SERVER_ACCESS_ENUMERATE);
{ Access rights for printers }
PRINTER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or
PRINTER_ACCESS_ADMINISTER or PRINTER_ACCESS_USE);
PRINTER_READ = (STANDARD_RIGHTS_READ or PRINTER_ACCESS_USE);
PRINTER_WRITE = (STANDARD_RIGHTS_WRITE or PRINTER_ACCESS_USE);
PRINTER_EXECUTE = (STANDARD_RIGHTS_EXECUTE or PRINTER_ACCESS_USE);
{ Access rights for jobs }
JOB_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or JOB_ACCESS_ADMINISTER);
JOB_READ = (STANDARD_RIGHTS_READ or JOB_ACCESS_ADMINISTER);
JOB_WRITE = (STANDARD_RIGHTS_WRITE or JOB_ACCESS_ADMINISTER);
JOB_EXECUTE = (STANDARD_RIGHTS_EXECUTE or JOB_ACCESS_ADMINISTER);
const
winspl = 'winspool.drv';
implementation
function AbortPrinter; external winspl name 'AbortPrinter';
function AddFormA; external winspl name 'AddFormA';
function AddFormW; external winspl name 'AddFormW';
function AddForm; external winspl name 'AddFormA';
function AddJobA; external winspl name 'AddJobA';
function AddJobW; external winspl name 'AddJobW';
function AddJob; external winspl name 'AddJobA';
function AddMonitorA; external winspl name 'AddMonitorA';
function AddMonitorW; external winspl name 'AddMonitorW';
function AddMonitor; external winspl name 'AddMonitorA';
function AddPortA; external winspl name 'AddPortA';
function AddPortW; external winspl name 'AddPortW';
function AddPort; external winspl name 'AddPortA';
function AddPrinterA; external winspl name 'AddPrinterA';
function AddPrinterW; external winspl name 'AddPrinterW';
function AddPrinter; external winspl name 'AddPrinterA';
function AddPrinterConnectionA; external winspl name 'AddPrinterConnectionA';
function AddPrinterConnectionW; external winspl name 'AddPrinterConnectionW';
function AddPrinterConnection; external winspl name 'AddPrinterConnectionA';
function AddPrinterDriverA; external winspl name 'AddPrinterDriverA';
function AddPrinterDriverW; external winspl name 'AddPrinterDriverW';
function AddPrinterDriver; external winspl name 'AddPrinterDriverA';
function AddPrintProcessorA; external winspl name 'AddPrintProcessorA';
function AddPrintProcessorW; external winspl name 'AddPrintProcessorW';
function AddPrintProcessor; external winspl name 'AddPrintProcessorA';
function AddPrintProvidorA; external winspl name 'AddPrintProvidorA';
function AddPrintProvidorW; external winspl name 'AddPrintProvidorW';
function AddPrintProvidor; external winspl name 'AddPrintProvidorA';
function AdvancedDocumentPropertiesA; external winspl name 'AdvancedDocumentPropertiesA';
function AdvancedDocumentPropertiesW; external winspl name 'AdvancedDocumentPropertiesW';
function AdvancedDocumentProperties; external winspl name 'AdvancedDocumentPropertiesA';
function ClosePrinter; external winspl name 'ClosePrinter';
function ConfigurePortA; external winspl name 'ConfigurePortA';
function ConfigurePortW; external winspl name 'ConfigurePortW';
function ConfigurePort; external winspl name 'ConfigurePortA';
function ConnectToPrinterDlg; external winspl name 'ConnectToPrinterDlg';
function DeleteFormA; external winspl name 'DeleteFormA';
function DeleteFormW; external winspl name 'DeleteFormW';
function DeleteForm; external winspl name 'DeleteFormA';
function DeleteMonitorA; external winspl name 'DeleteMonitorA';
function DeleteMonitorW; external winspl name 'DeleteMonitorW';
function DeleteMonitor; external winspl name 'DeleteMonitorA';
function DeletePortA; external winspl name 'DeletePortA';
function DeletePortW; external winspl name 'DeletePortW';
function DeletePort; external winspl name 'DeletePortA';
function DeletePrinter; external winspl name 'DeletePrinter';
function DeletePrinterConnectionA; external winspl name 'DeletePrinterConnectionA';
function DeletePrinterConnectionW; external winspl name 'DeletePrinterConnectionW';
function DeletePrinterConnection; external winspl name 'DeletePrinterConnectionA';
function DeletePrinterDriverA; external winspl name 'DeletePrinterDriverA';
function DeletePrinterDriverW; external winspl name 'DeletePrinterDriverW';
function DeletePrinterDriver; external winspl name 'DeletePrinterDriverA';
function DeletePrintProcessorA; external winspl name 'DeletePrintProcessorA';
function DeletePrintProcessorW; external winspl name 'DeletePrintProcessorW';
function DeletePrintProcessor; external winspl name 'DeletePrintProcessorA';
function DeletePrintProvidorA; external winspl name 'DeletePrintProvidorA';
function DeletePrintProvidorW; external winspl name 'DeletePrintProvidorW';
function DeletePrintProvidor; external winspl name 'DeletePrintProvidorA';
function DocumentPropertiesA; external winspl name 'DocumentPropertiesA';
function DocumentPropertiesW; external winspl name 'DocumentPropertiesW';
function DocumentProperties; external winspl name 'DocumentPropertiesA';
function EndDocPrinter; external winspl name 'EndDocPrinter';
function EndPagePrinter; external winspl name 'EndPagePrinter';
function EnumFormsA; external winspl name 'EnumFormsA';
function EnumFormsW; external winspl name 'EnumFormsW';
function EnumForms; external winspl name 'EnumFormsA';
function EnumJobsA; external winspl name 'EnumJobsA';
function EnumJobsW; external winspl name 'EnumJobsW';
function EnumJobs; external winspl name 'EnumJobsA';
function EnumMonitorsA; external winspl name 'EnumMonitorsA';
function EnumMonitorsW; external winspl name 'EnumMonitorsW';
function EnumMonitors; external winspl name 'EnumMonitorsA';
function EnumPortsA; external winspl name 'EnumPortsA';
function EnumPortsW; external winspl name 'EnumPortsW';
function EnumPorts; external winspl name 'EnumPortsA';
function EnumPrinterDriversA; external winspl name 'EnumPrinterDriversA';
function EnumPrinterDriversW; external winspl name 'EnumPrinterDriversW';
function EnumPrinterDrivers; external winspl name 'EnumPrinterDriversA';
function EnumPrintersA; external winspl name 'EnumPrintersA';
function EnumPrintersW; external winspl name 'EnumPrintersW';
function EnumPrinters; external winspl name 'EnumPrintersA';
function EnumPrintProcessorDatatypesA; external winspl name 'EnumPrintProcessorDatatypesA';
function EnumPrintProcessorDatatypesW; external winspl name 'EnumPrintProcessorDatatypesW';
function EnumPrintProcessorDatatypes; external winspl name 'EnumPrintProcessorDatatypesA';
function EnumPrintProcessorsA; external winspl name 'EnumPrintProcessorsA';
function EnumPrintProcessorsW; external winspl name 'EnumPrintProcessorsW';
function EnumPrintProcessors; external winspl name 'EnumPrintProcessorsA';
function FindClosePrinterChangeNotification; external winspl name 'FindClosePrinterChangeNotification';
function FindFirstPrinterChangeNotification; external winspl name 'FindFirstPrinterChangeNotification';
function FindNextPrinterChangeNotification; external winspl name 'FindNextPrinterChangeNotification';
function FreePrinterNotifyInfo; external winspl name 'FreePrinterNotifyInfo';
function GetFormA; external winspl name 'GetFormA';
function GetFormW; external winspl name 'GetFormW';
function GetForm; external winspl name 'GetFormA';
function GetJobA; external winspl name 'GetJobA';
function GetJobW; external winspl name 'GetJobW';
function GetJob; external winspl name 'GetJobA';
function GetPrinterA; external winspl name 'GetPrinterA';
function GetPrinterW; external winspl name 'GetPrinterW';
function GetPrinter; external winspl name 'GetPrinterA';
function GetPrinterDataA; external winspl name 'GetPrinterDataA';
function GetPrinterDataW; external winspl name 'GetPrinterDataW';
function GetPrinterData; external winspl name 'GetPrinterDataA';
function GetPrinterDriverA; external winspl name 'GetPrinterDriverA';
function GetPrinterDriverW; external winspl name 'GetPrinterDriverW';
function GetPrinterDriver; external winspl name 'GetPrinterDriverA';
function GetPrinterDriverDirectoryA; external winspl name 'GetPrinterDriverDirectoryA';
function GetPrinterDriverDirectoryW; external winspl name 'GetPrinterDriverDirectoryW';
function GetPrinterDriverDirectory; external winspl name 'GetPrinterDriverDirectoryA';
function GetPrintProcessorDirectoryA; external winspl name 'GetPrintProcessorDirectoryA';
function GetPrintProcessorDirectoryW; external winspl name 'GetPrintProcessorDirectoryW';
function GetPrintProcessorDirectory; external winspl name 'GetPrintProcessorDirectoryA';
function OpenPrinterA; external winspl name 'OpenPrinterA';
function OpenPrinterW; external winspl name 'OpenPrinterW';
function OpenPrinter; external winspl name 'OpenPrinterA';
function PrinterMessageBoxA; external winspl name 'PrinterMessageBoxA';
function PrinterMessageBoxW; external winspl name 'PrinterMessageBoxW';
function PrinterMessageBox; external winspl name 'PrinterMessageBoxA';
function PrinterProperties; external winspl name 'PrinterProperties';
function ReadPrinter; external winspl name 'ReadPrinter';
function ResetPrinterA; external winspl name 'ResetPrinterA';
function ResetPrinterW; external winspl name 'ResetPrinterW';
function ResetPrinter; external winspl name 'ResetPrinterA';
function ScheduleJob; external winspl name 'ScheduleJob';
function SetFormA; external winspl name 'SetFormA';
function SetFormW; external winspl name 'SetFormW';
function SetForm; external winspl name 'SetFormA';
function SetJobA; external winspl name 'SetJobA';
function SetJobW; external winspl name 'SetJobW';
function SetJob; external winspl name 'SetJobA';
function SetPrinterA; external winspl name 'SetPrinterA';
function SetPrinterW; external winspl name 'SetPrinterW';
function SetPrinter; external winspl name 'SetPrinterA';
function SetPrinterDataA; external winspl name 'SetPrinterDataA';
function SetPrinterDataW; external winspl name 'SetPrinterDataW';
function SetPrinterData; external winspl name 'SetPrinterDataA';
function StartDocPrinterA; external winspl name 'StartDocPrinterA';
function StartDocPrinterW; external winspl name 'StartDocPrinterW';
function StartDocPrinter; external winspl name 'StartDocPrinterA';
function StartPagePrinter; external winspl name 'StartPagePrinter';
function WaitForPrinterChange; external winspl name 'WaitForPrinterChange';
function WritePrinter; external winspl name 'WritePrinter';
end.