阅读:1543回复:2
请教关于98下打印机驱动的安装问题
OEMSETUP.INF文件的部分内容如下:
[virtual printer] DriverFile=vprinter.drv DataFile=vprinter.drv CopyFiles=@vprinter.DRV,UNI [UNI] UNIDRV.DLL 其中的vprinter.drv是98下驱动,但是需要UNIDRV.DLL 请教高手如何使用api安装 |
|
沙发#
发布于:2003-11-27 14:59
将这段做成个dll可以到处使用,只限98/me下的printer安装
PRINTER_INFO_2 pi2; DRIVER_INFO_2 di2; HANDLE hPrinter; BOOL xx; ZeroMemory(&di2, sizeof(DRIVER_INFO_2)); di2.cVersion = 1024; di2.pName = \"xx printer\"; di2.pEnvironment = \"Windows 4.0\"; di2.pDriverPath = \"c:\\\\windows\\\\system\\\\bitmap.drv\"; di2.pDataFile = \"c:\\\\windows\\\\system\\\\bitmap.drv\"; di2.pConfigFile = \"c:\\\\windows\\\\system\\\\bitmap.drv\"; xx=AddPrinterDriver(NULL, 2, (LPBYTE)&di2); ZeroMemory(&pi2, sizeof(PRINTER_INFO_2)); pi2.pPrinterName = \"xx printer\"; pi2.pPortName = \"LPT1:\"; pi2.pDriverName = \"xx printer\"; pi2.pPrintProcessor = \"WinPrint\"; pi2.pDatatype = \"RAW\"; pi2.Attributes = PRINTER_ATTRIBUTE_DEFAULT ; hPrinter = AddPrinter(NULL, 2, (LPBYTE)&pi2); ClosePrinter(hPrinter); // unidrv.dll见附件 |
|
|
板凳#
发布于:2003-11-27 15:25
谢谢 hglzw
|
|