Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.04.23;
Скачать: CL | DM;

Вниз

Помогите пожалуйста очень срочно нужно   Найти похожие ветки 

 
Сергей И.   (2006-04-11 14:37) [0]

function GetCurrentPrinterHandle: THandle;
var
 Device, Driver, Port: array[0..255] of Char;
 hDeviceMode: THandle;
begin
 Printer.GetPrinter(Device, Driver, Port, hDeviceMode);
 if not OpenPrinter(@Device, Result, nil) then
   RaiseLastWin32Error;
end;

Подскажите как данная функция определяет принтер.
Что значат DEvice,Driver,Port,hDeviceMode?


 
MBo ©   (2006-04-11 14:43) [1]

Я уж было подумал - в справке ничего про это нет..
Ан нет - каждое словечко описано!


 
AbrosimovA   (2006-04-11 15:54) [2]

Retrieves information about the current printer.

Delphi syntax:

procedure GetPrinter (ADevice, ADriver, APort: PChar; var ADeviceMode: THandle);

Description

Call GetPrinter to obtain information about the current printer.

ADevice is a buffer that receives the device name of the current printer. This is the name that appears in the Print Manager (for example, "Epson FX-80"). It is not the printer model name.

ADriver is a buffer that receives the driver name for the current printer. Some versions of Windows do not use printer driver names, in which case this buffer is unused. On versions of Windows that support printer driver names, this is the name of a printer driver (usually ‘WINSPOOL’).

APort is a buffer that receives the port used by the current printer. It is not used on 32-bit versions of Windows, but is included for backward compatibility.

DeviceMode returns the handle to a memory buffer containing a DeviceMode record, which contains device-specific initialization data for the device driver. Use the GlobalLock function to convert this handle into a pointer to the record.



Страницы: 1 вся ветка

Текущий архив: 2006.04.23;
Скачать: CL | DM;

Наверх




Память: 0.45 MB
Время: 0.012 c
3-1140959607
stone
2006-02-26 16:13
2006.04.23
Удаление из DBF


15-1143805947
oldman
2006-03-31 15:52
2006.04.23
Бывают же такие руки...


15-1144041846
07BB
2006-04-03 09:24
2006.04.23
Что ты сделал для своего народа, города,страны???


2-1144185516
ValliGRoB
2006-04-05 01:18
2006.04.23
OpenFile


15-1144047436
Новичоккк
2006-04-03 10:57
2006.04.23
Только что узнал что Razorback закрыли (eMule)





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский