кстати вот кусок описаний
Цитата:
PPrinterInfo2A = ^TPrinterInfo2A;
PPrinterInfo2W = ^TPrinterInfo2W;
PPrinterInfo2 = PPrinterInfo2A;
{$EXTERNALSYM _PRINTER_INFO_2A}
_PRINTER_INFO_2A = 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;
{$EXTERNALSYM _PRINTER_INFO_2W}
_PRINTER_INFO_2W = 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;
{$EXTERNALSYM _PRINTER_INFO_2}
_PRINTER_INFO_2 = _PRINTER_INFO_2A;
TPrinterInfo2A = _PRINTER_INFO_2A;
TPrinterInfo2W = _PRINTER_INFO_2W;
TPrinterInfo2 = TPrinterInfo2A;
{$EXTERNALSYM PRINTER_INFO_2A}
PRINTER_INFO_2A = _PRINTER_INFO_2A;
{$EXTERNALSYM PRINTER_INFO_2W}
PRINTER_INFO_2W = _PRINTER_INFO_2W;
{$EXTERNALSYM PRINTER_INFO_2}
PRINTER_INFO_2 = PRINTER_INFO_2A;
Цитата: pi2: PRINTER_INFO_2;
size_pi: dword;
...
getmem( pi2, sizeof(size_pi));
ИМХО не совсем верно лучше так (с учетом описаний)
pi2: PPrinterInfo2;
size_pi: dword;
...
getmem( pi2, sizeof(TPrinterInfo2));
иначе я вообще не вижу смысла выделять память для пи2.